随机打乱顺序
gdata = gdata.sample(frac=1)
gdata = gdata.reset_index(drop=True)
print(gdata)
输出有缺失值的index
test=gdata.isnull().any()#检查缺失值
print(test.index)
j = len(test)
for i in range(j):
if test[i]==True:
print(test.index[i])
删除某列
del gdata['Salary_Account']
删除有缺失值的行
test=gdata[gdata.Loan_Amount_Applied.isnull().values==True]
print(test.shape)
gdata=gdata.drop(test.index)