@@ -199,18 +199,21 @@ class Categorical(PandasObject):
199
199
>>> from pandas import Categorical
200
200
>>> Categorical([1, 2, 3, 1, 2, 3])
201
201
[1, 2, 3, 1, 2, 3]
202
- Categories (3, int64): [1 < 2 < 3]
202
+ Categories (3, int64): [1, 2, 3]
203
203
204
204
>>> Categorical(['a', 'b', 'c', 'a', 'b', 'c'])
205
205
[a, b, c, a, b, c]
206
- Categories (3, object): [a < b < c]
206
+ Categories (3, object): [a, b, c]
207
207
208
208
Only ordered `Categoricals` can be sorted (according to the order
209
209
of the categories) and have a min and max value.
210
210
211
- >>> a = Categorical(['a','b','c','a','b','c'], ['c', 'b', 'a'],
212
- ordered=True)
213
- >>> a.min()
211
+ >>> c = Categorical(['a','b','c','a','b','c'], categories=['c', 'b', 'a'],
212
+ ... ordered=True)
213
+ >>> c
214
+ [a, b, c, a, b, c]
215
+ Categories (3, object): [c < b < a]
216
+ >>> c.min()
214
217
'c'
215
218
216
219
Notes
@@ -219,11 +222,8 @@ class Categorical(PandasObject):
219
222
220
223
See also
221
224
--------
222
- Categorical.sort
223
- Categorical.order
224
- Categorical.min
225
- Categorical.max
226
225
pandas.api.types.CategoricalDtype
226
+ CategoricalIndex : An Index with an underlying ``Categorical``
227
227
"""
228
228
229
229
# For comparisons, so that numpy uses our implementation if the compare
0 commit comments