Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.CategoricalIndex.map

CategoricalIndex.map(mapper)[source]

Apply mapper function to its categories (not codes).

Parameters:

mapper : callable

Function to be applied. When all categories are mapped to different categories, the result will be a CategoricalIndex which has the same order property as the original. Otherwise, the result will be a Index.

Returns:

applied : CategoricalIndex or Index

Scroll To Top