Closed
Description
xref #8074. Some issues about pd.cut/qcut
(http://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html#pandas.cut):
- If the input is a Series, also return a Series?
- The produced categorical is not ordered, while the
Categorical
constructor is by default. Also in the case ofcut
it seems logical that it would be ordered? - The docstring of cut makes use of
labels
, but I think here the individual categories are meant, and not the numerical representation (codes) (still another use oflabels
, good we changed that name! :-)), but I am not fully sure of the explanation:-
"Labels to use for bin edges" -> why the 'edges'? Are it not just the labels for the bins itself? (this sets what we now call the 'levels'):
In [23]: pd.cut([1,2,3,4], bins=3, labels=['a', 'b', 'c']) Out[23]: a a b c Levels (3, object): [a, b, c]
-
"or False to return integer bin labels" -> this is what now is called 'codes'?
-
should we rename this to
levels/categories
?
-