started learning Python for data science a few weeks ago, and ran into this problem for my own project. I'm trying to replace gaming publisher name to "Other" if the count is below 5. When I use .mask() function, however, it seems to also replace the "Count" value to "Other" as well. Any possible way to just change the "Publisher" value to "Other" and keep the "Count" value as it is?
The method I tried is below:
publisher_subset = data.filter(['Publisher'])
df = publisher_subset.value_counts().reset_index(name='Counts')
df.mask(df["Counts"] <= 5, "Other", inplace=False)
```
[enter image description here](https://i.stack.imgur.com/kOzFY.png)`