SeriesGroupBy.
value_counts
Compute group sizes.
Sort by frequencies.
Sort in ascending order.
Don’t include counts of NaN.
See also
databricks.koalas.Series.groupby
databricks.koalas.DataFrame.groupby
Examples
>>> df = ks.DataFrame({'A': [1, 2, 2, 3, 3, 3], ... 'B': [1, 1, 2, 3, 3, 3]}, ... columns=['A', 'B']) >>> df A B 0 1 1 1 2 1 2 2 2 3 3 3 4 3 3 5 3 3
>>> df.groupby('A')['B'].value_counts().sort_index() A B 1 1 1 2 1 1 2 1 3 3 3 Name: B, dtype: int64