当前位置:   article > 正文

【Pandas】pandas.Series.value_counts的使用_pd.series().value_counts()

pd.series().value_counts()

语法:

Series.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True)[source]

Return a Series containing counts of unique values.
The resulting object will be in descending order so that the first element is the most frequently-occurring element. Excludes NA values by default.

举例:

s = pd.Series([3, 1, 2, 3, 4
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/239130
    推荐阅读
    相关标签
      

    闽ICP备14008679号