Python数据分析实践Python数据分析实践 (26).pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《Python数据分析实践Python数据分析实践 (26).pdf》由会员分享,可在线阅读,更多相关《Python数据分析实践Python数据分析实践 (26).pdf(2页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2021/11/21 下午4:365-1-2file:/C:/Users/sgl/Downloads/5-1-2.html1/2In:import pandas as pd pd.set_option(display.unicode.east_asian_width,True)#解决数据输出时列名不对齐的问题 df=pd.read_excel(tdata/cj.xlsx)#读取数据 5.1.2数据清洗-缺失值处理In:import pandas as pd pd.set_option(display.unicode.east_asian_width,True)#解决数据输出时列名不对齐的问题
2、df=pd.read_excel(tdata/cj.xlsx)#读取数据 In:#存在任一缺失值即删除 df1=df.dropna()print(删除前:,df.shape)print(删除后:,df1.shape)In:#所有列均为缺失值即删除 df1=df.dropna(how=all)print(删除前:,df.shape)print(删除后:,df1.shape)In:#指定列均为缺失值即删除 df1=df.dropna(how=all,subset=专业,选修)print(删除前:,df.shape)print(删除后:,df1.shape)In:#保留某些属性中不存在缺失值的情况
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Python数据分析实践Python数据分析实践 26 Python 数据 分析 实践 26
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内