python 找到dataframe中某一列缺失值对应的索引

import numpy as np
import pandas as pd
a = pd.DataFrame([np.nan,1,2])
a.index[np.where(np.isnan(a))[0]] 

猜你喜欢

转载自blog.csdn.net/u_7890/article/details/83542253
今日推荐