modin.pandas.SeriesGroupBy.value_counts¶
- SeriesGroupBy.value_counts(subset: Optional[list[str]] = None, normalize: bool = False, sort: bool = True, ascending: bool = False, bins: Optional[int] = None, dropna: bool = True)[source]¶
Return a Series or
DataFrame
containing counts of unique rows.- Parameters:
subset (list-like, optional) – Columns to use when counting unique combinations.
normalize (bool, default False) –
Return proportions rather than frequencies.
Note that when normalize=True, groupby is called with sort=False, and value_counts is called with sort=True, Snowpark pandas will order results differently from native pandas. This occurs because native pandas sorts on frequencies before converting them to proportions, while Snowpark pandas computes proportions within groups before sorting.
See issue for details: https://github.com/pandas-dev/pandas/issues/59307
sort (bool, default True) – Sort by frequencies.
ascending (bool, default False) – Sort in ascending order.
bins (int, optional) – Rather than count values, group them into half-open bins, a convenience for pd.cut, only works with numeric data. This parameter is not yet supported in Snowpark pandas.
dropna (bool, default True) – Don’t include counts of rows that contain NA values.
- Return type: