File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -241,10 +241,14 @@ class Categorical(ExtensionArray, PandasObject):
241241 categories will be replaced with NaN.
242242 categories : Index-like (unique), optional
243243 The unique categories for this categorical. If not given, the
244- categories are assumed to be the unique values of values.
244+ categories are assumed to be the unique values of `values` (sorted, if
245+ possible, otherwise in the order in which they appear).
245246 ordered : boolean, (default False)
246247 Whether or not this categorical is treated as a ordered categorical.
247- If not given, the resulting categorical will not be ordered.
248+ If True, the resulting categorical will be ordered.
249+ An ordered categorical respects, when sorted, the order of its
250+ `categories` attribute (which in turn is the `categories` argument, if
251+ provided).
248252 dtype : CategoricalDtype
249253 An instance of ``CategoricalDtype`` to use for this categorical
250254
You can’t perform that action at this time.
0 commit comments