I have data that is taken from excel sheet using data=pd.read_excel("test.xlsx").to_dict() function. I made several changes on data taken from that function and created such an list
[[0, nan], [1, nan], [2, nan], [3, nan], [4, nan], [5, nan], [6, nan], [7, nan], [8, nan], [9, nan], [10, nan], [11, nan]]
When I try to remove each element that constitute "nan", gives me error that is shown as below
for listinside in list2:
if 'nan' in listinside[1]:
listinside.remove()
else:
pass
print(list2)
TypeError: argument of type 'float' is not iterable
I kindly ask you to help me to remove each element from entire list that constitute 'nan'.