pandas一些其他函数

df.sort_index()
df.idxmax(0) 最大值的索引,参数有轴
df.cumsum() 累和

s.unique() 不重复的所有的值
s.nunique() 不重复的值得数量
s.drop_duplicates() 去重

df.groupby(["key1","key2"]).size() 每个分组的元素个数

猜你喜欢

转载自www.cnblogs.com/oklizz/p/11805257.html