-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Drop support for NaN categories in Categorical #15806
Conversation
7d9f5ec
to
b6a5395
Compare
84fc041
to
671d0bc
Compare
Codecov Report
@@ Coverage Diff @@
## master #15806 +/- ##
==========================================
- Coverage 91.01% 90.97% -0.04%
==========================================
Files 143 143
Lines 49387 49386 -1
==========================================
- Hits 44948 44930 -18
- Misses 4439 4456 +17
Continue to review full report at Codecov.
|
pandas/tests/test_categorical.py
Outdated
self.assertTrue(is_float_dtype(cat.categories)) | ||
|
||
# Cannot have NaN in categories | ||
def f(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test for NaT as well, and FYI, you can use pytest syntax
with pytest.raises(ValueError):
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
xref #13648 testing with |
671d0bc
to
f2bdd51
Compare
Deprecated in 0.17.0. xref pandas-devgh-10748 xref pandas-devgh-13648
f2bdd51
to
4dce349
Compare
thanks! |
Deprecated in 0.17.0. xref pandas-dev#10748 xref pandas-dev#13648 Author: Jeff Reback <jeff@reback.net> Author: gfyoung <gfyoung17@gmail.com> Closes pandas-dev#15806 from gfyoung/categories-nan-drop and squashes the following commits: 318175b [Jeff Reback] TST: test pd.NaT with correct dtype 4dce349 [gfyoung] Drop support for NaN categories in Categorical
Deprecated in 0.17.0.
xref #10748
xref #13648