Skip to content

Doc: fix ES01 for pandas.CategoricalDtype #57610

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.Categorical.ordered\
pandas.Categorical.remove_unused_categories\
pandas.Categorical.rename_categories\
pandas.CategoricalDtype\
pandas.CategoricalDtype.categories\
pandas.CategoricalDtype.ordered\
pandas.CategoricalIndex.as_ordered\
Expand Down
11 changes: 11 additions & 0 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
"""
Type for categorical data with the categories and orderedness.

A categorical's type is fully described by
1. categories: a sequence of unique values and no missing values
2. ordered: a boolean
This information can be stored in a CategoricalDtype. The categories argument
is optional, which implies that the actual categories should be inferred from
whatever is present in the data when the pandas.Categorical is created.
The categories are assumed to be unordered by default.

A CategoricalDtype can be used in any place pandas expects a dtype. For example
pandas.read_csv(), pandas.DataFrame.astype(), or in the Series constructor.

Parameters
----------
categories : sequence, optional
Expand Down