내가 보려고 만드는/파이썬

[파이썬] Pandas pd.Series.value_counts()

gaga_ 2022. 1. 20. 13:24
pd.Series.value_counts(normalize=False,
						sort=True,
            			ascending=False,
            			bins=None,
            			dropna=True)

Parameter

  • normalize: bool, default False
    - True:  상대 비율
    - False: 개수
  • sort: bool, default True
    - True: 개수 기준으로 정렬
    - False: 인덱스 순으로 정렬
  • ascending: bool, default False
    - True: 오름차순 정렬
    - False: 내림차순 정렬
  • bins: int, optional
    - int: bin group 별 개수
  • dropna: bool, default True
    - True: NaN 무시
    - False: NaN 포함

 

 

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.value_counts.html

 

pandas.Series.value_counts — pandas 1.3.5 documentation

Rather than count values, group them into half-open bins, a convenience for pd.cut, only works with numeric data.

pandas.pydata.org