dataframe 删除空行及去重
df=df[~(df['col'].isnull())] #删掉空行df=df.dropna(axis=0)#删除有空值的行,使用参数axis=0df=df.dropna(axis=1)#删除有空值的列,使用参数axis=1
·
df=df[~(df['col'].isnull())] #删掉空行
df=df.dropna(axis=0) #删除有空值的行,使用参数axis=0
df=df.dropna(axis=1) #删除有空值的列,使用参数axis=1
更多推荐



所有评论(0)