首页 > 其他 > 详细

pandas NA handling

时间:2020-02-03 11:21:28      阅读:96      评论:0      收藏:0      [点我收藏+]

原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/12254786.html

 

NA handling methods

技术分享图片

 

isnull, not null

技术分享图片

The built-in Python None value is also treated as NA in object arrays

技术分享图片

 

dropna

There are a few ways to filter out missing data. While you always have the option to do it by hand using pandas.isnull and boolean indexing, the dropna can be helpful. On a Series, it returns the Series with only the non-null data and index values.

技术分享图片 

 

 

Reference

Python for Data Analysis Second Edition

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.isnull.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.notnull.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dropna.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.fillna.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.fillna.html

 

pandas NA handling

原文:https://www.cnblogs.com/agilestyle/p/12254786.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!