if 'value1' in results_dict:
if results_dict['value1'] is not None:
if results_dict['value1']['limit'] is None:
res.append(results_dict['value1']['limit'] == "Nan")
else:
res.append(results_dict['value1']['limit'])
else:
res.append(results_dict['value1']['limit'] == "Nan")
else:
res.append("Nan")
I am trying to fix an issue that is not allowing me to append values to 'res' (res.append(results_dict['value1']['limit'] == "Nan"))
I am getting TypeError: 'NoneType' object is not subscriptable
I am trying to check if there is a None value and replacing it with NaN. I also want to keep the key
names. I also used .get twice but that gave me an Attribute Error.