pandas.CategoricalIndex.remove_categories
pandas 3.1.1 · Index objects · method
Remove selected categories and mark observations using them as missing.
Call syntax
CategoricalIndex.remove_categories(removals)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
removals |
Required Positional or keyword |
category or list of categories Supply categories to remove from the set of allowed values. |
Returns
CategoricalIndex