Skip to content

BUG: Dataframe.fillna with np.nan for dtype=category(GH 14021) #14051

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

Closed

Conversation

conquistador1492
Copy link
Contributor

@conquistador1492 conquistador1492 commented Aug 19, 2016

@codecov-io
Copy link

codecov-io commented Aug 20, 2016

Current coverage is 85.27% (diff: 0.00%)

Merging #14051 into master will increase coverage by <.01%

@@             master     #14051   diff @@
==========================================
  Files           139        139          
  Lines         50446      50448     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43018      43021     +3   
+ Misses         7428       7427     -1   
  Partials          0          0          

Powered by Codecov. Last update df2d9ab...a405777

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Categorical Categorical Data Type labels Aug 20, 2016
@@ -1444,7 +1444,10 @@ def fillna(self, value=None, method=None, limit=None):
mask = values == -1
if mask.any():
values = values.copy()
values[mask] = self.categories.get_loc(value)
if not value == value:
Copy link
Contributor

Choose a reason for hiding this comment

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

use isnull(value))

@jreback jreback added this to the 0.19.0 milestone Aug 20, 2016
@jreback
Copy link
Contributor

jreback commented Aug 26, 2016

thanks!

@jreback jreback closed this in 0e61847 Aug 26, 2016
@conquistador1492 conquistador1492 deleted the issue_14021 branch August 26, 2016 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Categorical Categorical Data Type Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message when fillna is used with NaN with category dtype
3 participants