There are more than 60000 categories in one of the variables of a data frame. I want to group the categories as 'OTHERS' where the value count is less than 1000.
How to do that?[![enter image description here](https://i.stack.imgur.com/m2IVx.png)](https://i.stack.imgur.com/m2IVx.png)