Skip to content

BUG: Fix downcast argument for DataFrame.fillna() #15278

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
wants to merge 3 commits into from

Conversation

albertvillanova
Copy link
Contributor

@albertvillanova albertvillanova commented Feb 1, 2017

@albertvillanova albertvillanova changed the title BUG: Fix downcast argument for DataFrame.fillna() #15277 BUG: Fix downcast argument for DataFrame.fillna() Feb 1, 2017
@jreback
Copy link
Contributor

jreback commented Feb 1, 2017

needs tests, pls add for both series & dataframe (in pandas/tests/series/test_missing.py and similar for frame).

add alongside the existing tests

pls add a whatsnew note (bug fixes for 0.20.0)

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Feb 1, 2017
@codecov-io
Copy link

codecov-io commented Feb 1, 2017

Codecov Report

Merging #15278 into master will increase coverage by -0.01%.

@@            Coverage Diff             @@
##           master   #15278      +/-   ##
==========================================
- Coverage   86.33%   86.32%   -0.01%     
==========================================
  Files         139      139              
  Lines       51149    51157       +8     
==========================================
+ Hits        44157    44162       +5     
- Misses       6992     6995       +3
Impacted Files Coverage Δ
pandas/core/generic.py 96.33% <100%> (ø)
pandas/core/common.py 91.02% <ø> (-0.34%)
pandas/util/testing.py 82.54% <ø> (-0.19%)
pandas/indexes/category.py 98.57% <ø> (ø)
pandas/tseries/base.py 96.59% <ø> (ø)
pandas/indexes/base.py 96.17% <ø> (+0.01%)

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 9ddba8d...1b594a9. Read the comment docs.

@@ -268,6 +268,19 @@ def test_datetime64tz_fillna_round_issue(self):

assert_series_equal(filled, expected)

def test_fillna_downcast(self):
# infer int64 from float64
s = pd.Series([1., np.nan])
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a flake error :<

@jreback jreback added this to the 0.20.0 milestone Feb 3, 2017
@jreback
Copy link
Contributor

jreback commented Feb 3, 2017

lgtm. though you are going to fail linting because of indentation :< ping on green

@albertvillanova
Copy link
Contributor Author

Is it OK now or some additional changes are needed? Should I squash all the commits into a single one?

@jreback jreback closed this in f742a66 Feb 6, 2017
@jreback
Copy link
Contributor

jreback commented Feb 6, 2017

thanks @albertvillanova

squashing is really no longer necessary as our merging process will squash (and retain the commit links).

AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
closes pandas-dev#15277

Author: Albert Villanova del Moral <[email protected]>

Closes pandas-dev#15278 from albertvillanova/fix-15277 and squashes the following commits:

1b594a9 [Albert Villanova del Moral] Fix tab indentation
631a2dc [Albert Villanova del Moral] Add whatsnew note
d691954 [Albert Villanova del Moral] BUG: Fix downcast argument for DataFrame.fillna()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.fillna() downcast argument does not work when the value for fillna is a dict instead of a scalar
3 participants