I have an issue that really drives me mad. Normally doing int(20.0) would result in 20. So far so good. But:
int(20.0)
20
levels = [int(gex_dict
It looks like the value is a string, not a float. So you need int(float(gex_dict[i]))
int(float(gex_dict[i]))