get_unique_values
Lists unique values with frequencies for a column, sorted by count descending. Helps understand categorical columns and identify rare categories before encoding.
Instructions
List unique values with their frequencies for a column, sorted by count descending. Understand categorical columns before encoding. Reveals rare categories that may need grouping. Example: get_unique_values(column="CargoType", top_n=20)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| column | Yes | ||
| df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |