From ccfead1919f727b94150d113f67eb66de06f824e Mon Sep 17 00:00:00 2001 From: Roshni Biswas Date: Thu, 10 Oct 2019 00:00:52 -0400 Subject: [PATCH] pandas.Categorical.from_codes: update codes type: ints, dtype type: str --- pandas/core/arrays/categorical.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index bab1127e6e539..8e5a58877e81b 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -636,7 +636,7 @@ def from_codes(cls, codes, categories=None, ordered=None, dtype=None): Parameters ---------- - codes : array-like, integers + codes : array-like, ints An integer array, where each integer points to a category in categories or dtype.categories, or else is -1 for NaN. categories : index-like, optional @@ -647,7 +647,7 @@ def from_codes(cls, codes, categories=None, ordered=None, dtype=None): Whether or not this categorical is treated as an ordered categorical. If not given here or in `dtype`, the resulting categorical will be unordered. - dtype : CategoricalDtype or the string "category", optional + dtype : CategoricalDtype or the str "category", optional If :class:`CategoricalDtype`, cannot be used together with `categories` or `ordered`.