-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Behavior of Series.values when dtype is "category" is surprising #9580
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
Comments
Aside from the documentation issue, I thought that using |
I suppose the doc-string could be updated.
|
Well, ok, but that's not quite the same as giving you an object that has all the methods on an ndarray. I currently have code failing because it is trying to use the |
a categorical is NOT an ndarray, though it would act like it. It is simply not representable by an ndarray (its more like 2 ndarrays). |
I completely agree. Which is why I'm saying that from a user perspective, the behavior of |
I agree, the documentation here is broken. We should point users toward using |
@mwaskom you can simply use
|
Thanks @jreback though I will probably not be using an "internal-ish" method in library code. |
i'll clarify I meant |
The docstring of |
Say I make a category-type Series:
I want to pass this to a function that expects a numpy array, so I use the
values
property. According to the documentation:However:
The text was updated successfully, but these errors were encountered: