I have a pandas dataframe of shape ~ [200K, 40]. The dataframe has a categorical column (one of many) with over 1000 unique values. I can visualizee the value counts of each such unique column by using:
df['column_name'].value_counts()
How do i now club values with:
- value_count less than a threshold value, say, 100, and map them to, say, "miscellaneous"?
- OR based on the cumulative row count % ?