O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Renaming categories

A Categorical can have values renamed by assigning new values to the .categories property or using the .rename_categories() method.

Note that this was an in-place modification. To prevent an in-place modification, we can use the .rename_categories() method.

We can verify that this was not done in-place.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required