wlbk.net
当前位置:首页 >> pAnDAs Drop inDEx >>

pAnDAs Drop inDEx

data.drop(n)可以删除第i行import pandas as pddata=pd.DataFrame([[1,2,3],[4,5,6]])print data.drop(0)输出结果为 0 1 2 1 4 5 6

df.dropna()

先看一个小例子 from pandas import Series, DataFrame data = DataFrame({'k': [1, 1, 2, 2]}) print data IsDuplicated = data.duplicated() print IsDuplicated print type(IsDuplicated) data = data.drop_duplicates() print data 执行结果...

网站首页 | 网站地图
All rights reserved Powered by www.wlbk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com