-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: Change str for CategoricalDtype to category #17783
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
Conversation
Better compatibility with older versions
Codecov Report
@@ Coverage Diff @@
## master #17783 +/- ##
==========================================
- Coverage 91.24% 91.22% -0.02%
==========================================
Files 163 163
Lines 49916 49910 -6
==========================================
- Hits 45544 45530 -14
- Misses 4372 4380 +8
Continue to review full report at Codecov.
|
I am not sure this is a great idea, what is the purpose here? |
There's, lot's of code out there that expects Why are you against it? |
this loses informtion, no reason why for that. where does code == 'str(dtype)` live? IOW can you show me an example from a project? |
The information is still there... It's only when you call str(dtype). I
linked to an example in the issue
- https://github.com/dask/fastparquet/pull/200/files
-
dask/dask@f8e382c
-
https://github.com/apache/arrow/pull/1161/files#diff-4b312e1fbf7b4c070f9788be9db33b20R198
…On Thu, Oct 5, 2017 at 7:17 AM, Jeff Reback ***@***.***> wrote:
this loses informtion, no reason why for that. where does code ==
'str(dtype)` live? IOW can you show me an example from a project?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17783 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIuzmNIBNpLZDD9nVR_lYyGuDyUYQks5spMjigaJpZM4PtwTu>
.
|
the |
Ok, I'm +1 for this change, and so is Joris. |
It maybe never really was meant to do that, but before is_categorical was consistently publicly exposed, I think it was a sensible thing to do. |
ok then, merge away. |
Another reason that I think this was a good change, is because it is used in the 'dtypes' overview. Before this PR you got:
which I think is not ideal (although that might have been solved in another way as well). But that did me think, we could think of some kind of 'shorter but still informative' repr like datetimetz has (although once you have more categories, it will always be truncated, which is not that nice in a default repr I think). |
Better compatibility with older versions
Closes #17782