woodwork.table_accessor.WoodworkTableAccessor.value_counts#

WoodworkTableAccessor.value_counts(ascending=False, top_n=10, dropna=False)[source]#
Returns a list of dictionaries with counts for the most frequent values in each column (only

for columns with category as a standard tag).

Parameters:
  • ascending (bool) – Defines whether each list of values should be sorted most frequent to least frequent value (False), or least frequent to most frequent value (True). Defaults to False.

  • top_n (int) – the number of top values to retrieve. Defaults to 10.

  • dropna (bool) – determines whether to remove NaN values when finding frequency. Defaults to False.

Returns:

a list of dictionaries for each categorical column with keys count and value.

Return type:

list(dict)