参考:https://blog.csdn.net/m0_54650283/article/details/122382632
缺失值所在的列
df.isna().any()
返回某列缺失值所在的行
df.loc[df['A'].isnull()].index.tolist()
缺失值字典,{列:缺失行}
a = df.isnull().any()
a = a.loc[a==True]
columns = a.index.tolist()
mydict = {}#创建一个字典来存储所有的位置
temp = []
for column in columns:
temp = df.loc[df[column].isnull()].index.tolist()
mydict[column] = temp
mydict