-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: _get_dtype accepts CategoricalDtype but throws TypeError with a Categorical #16817
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This is an internal method, do you actually need it for something? |
So if we can nail down these issues, then can address what else / what should |
@topper-123 love to have some help here with this :> |
Hi, I think that could be relatively easy, and could give it a shot. Some issues, though:
In short, if I can get some help on how to get the tests to run cleanly, and C/Cython knowledge isn't required, I'll give this a go. I'm on Windows 10 and use the Anaconda distribution. |
have a look here: http://pandas.pydata.org/pandas-docs/stable/contributing.html pretty complete instructions on how to run a dev environment on windows. its pretty straightforward, but if you need help pls ping. |
And the fact that That is, should it be marked in the tests as ok or a failure that _get_dtype raises when given a categorical? |
its reasonable to accept a
|
Uh oh!
There was an error while loading. Please reload this page.
Problem description
I find it inconistent that
_get_dtype
accept aCategoricalDtype
, but will thow TypeError onCategorical
s.Code Sample, a copy-pastable example if possible
Expected Output
Proposed solution
A solution could be to check for extension type (maybe just categorical dtype, not sure) + that
arr_or_dtype
has a dtype attribute:The text was updated successfully, but these errors were encountered: