2018-12-19
阅读量:
722
group by中的NA值
GroupBy中的NA组被自动排除。此行为与R一致,例如:
In [39]: df
Out[39]:
one two three
a NaN 0.501113 -0.355322
c NaN 0.580967 0.983801
e 0.057802 0.761948 -0.712964
f -0.443160 -0.974602 1.047704
h NaN -1.053898 -0.019369
In [40]: df.groupby('one').mean()
Out[40]:
two three
one
-0.443160 -0.974602 1.047704
0.057802 0.761948 -0.712964






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论