Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Mar 26, 2017

Deprecated in 0.17.0.

xref #10748
xref #13648

@jreback jreback added Categorical Categorical Data Type Deprecate Functionality to remove in pandas labels Mar 26, 2017
@gfyoung gfyoung force-pushed the categories-nan-drop branch 2 times, most recently from 84fc041 to 671d0bc Compare March 26, 2017 02:40
@codecov
Copy link

codecov bot commented Mar 26, 2017

Codecov Report

Merging #15806 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
pandas/core/categorical.py 95.85% <100%> (-1.05%) ⬇️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/common.py 90.96% <0%> (-0.34%) ⬇️
pandas/core/frame.py 97.56% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da92411...318175b. Read the comment docs.

self.assertTrue(is_float_dtype(cat.categories))

# Cannot have NaN in categories
def f():
Copy link
Contributor

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):
    ....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jreback
Copy link
Contributor

jreback commented Mar 26, 2017

xref #13648 testing with None as well.

@gfyoung
Copy link
Member Author

gfyoung commented Mar 26, 2017

@jreback : Added tests for #13648, and everything is still green.

@jreback jreback added this to the 0.20.0 milestone Mar 27, 2017
@jreback
Copy link
Contributor

jreback commented Mar 27, 2017

thanks!

@jreback jreback closed this in 80280ec Mar 27, 2017
@gfyoung gfyoung deleted the categories-nan-drop branch March 27, 2017 19:16
mattip pushed a commit to mattip/pandas that referenced this pull request Apr 3, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants