Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename categories with Series #17982

Merged
merged 9 commits into from
Oct 26, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More doc cleanup
  • Loading branch information
TomAugspurger committed Oct 26, 2017
commit cbcc723d953a413423c6fe8c1c59d901bcca5308
8 changes: 5 additions & 3 deletions pandas/core/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,10 +879,10 @@ def rename_categories(self, new_categories, inplace=False):
* list-like: all items must be unique and the number of items in
the new categories must match the existing number of categories.

* ..versionadded:: 0.21.0 dict-like: specifies a mapping from
* dict-like: specifies a mapping from
old categories to new. Categories not contained in the mapping
are passed through and extra categories in the mapping are
ignored.
ignored. *New in verison 0.21.0*.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verison -> version


.. warning::

Expand All @@ -895,7 +895,9 @@ def rename_categories(self, new_categories, inplace=False):

Returns
-------
cat : Categorical with renamed categories added or None if inplace.
cat : Categorical or None
With ``inplace=False``, the new categorical is returned.
With ``inplace=True``, there is no return value.

See also
--------
Expand Down