pandas模块dropna数据清理删除NaN--python3

2025-07-16 06:51:15

1、首先介绍dropna常用参数:# DataFrame.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)主要的2个参数:#axis=0: 删除包含缺失值(NaN)的行#axis=1: 删除包含缺失值(NaN)的列# how=‘any’ :要有缺失值(NaN)出现删除# how=‘all’: 所有的值都缺失(NaN)才删除这两个要配合使用才好。还有一个thresh参数如果缺失值(NaN)的数量大于thresh,将删除

pandas模块dropna数据清理删除NaN--python3pandas模块dropna数据清理删除NaN--python3pandas模块dropna数据清理删除NaN--python3pandas模块dropna数据清理删除NaN--python3pandas模块dropna数据清理删除NaN--python3pandas模块dropna数据清理删除NaN--python3
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢