I'll explain on example.
I have this data:
id day week
1 10 3
2 NaN 4
NaN NaN 5
And I need this output:
id [2]
day [1, 2]
week False (or smth like this)
Output shows indexes with NaN
values for each column.
I have written code for this, but I don't like it:
index_nan = []
for col in data.columns:
if data[col].isnull().sum()==0:
index_nan.append('False')
else:
index_nan.append(str(data[data[col].isna()].index.to_numpy()))