Skip to content

BUG: Fix isna cannot handle ambiguous typed list #20971

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

Merged
merged 4 commits into from
May 8, 2018

Conversation

Licht-T
Copy link
Contributor

@Licht-T Licht-T commented May 7, 2018

@Licht-T Licht-T force-pushed the fix-isna-behavior-for-lists branch from 13bf3de to 27a8d55 Compare May 7, 2018 06:48
@codecov
Copy link

codecov bot commented May 7, 2018

Codecov Report

Merging #20971 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20971      +/-   ##
==========================================
- Coverage   91.82%   91.81%   -0.01%     
==========================================
  Files         153      153              
  Lines       49483    49487       +4     
==========================================
  Hits        45437    45437              
- Misses       4046     4050       +4
Flag Coverage Δ
#multiple 90.21% <50%> (-0.01%) ⬇️
#single 41.85% <33.33%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/dtypes/missing.py 91.95% <50%> (-0.99%) ⬇️
pandas/util/testing.py 84.38% <0%> (-0.21%) ⬇️

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 587a0dd...c2c45b1. Read the comment docs.

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels May 7, 2018
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

pls add a whatsnew note (bug fix / reshaping)

@@ -120,7 +120,9 @@ def _isna_new(obj):
return _isna_ndarraylike(obj)
elif isinstance(obj, ABCGeneric):
return obj._constructor(obj._data.isna(func=isna))
elif isinstance(obj, list) or hasattr(obj, '__array__'):
elif isinstance(obj, list):
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 make the same change in _isna_old

@Licht-T Licht-T force-pushed the fix-isna-behavior-for-lists branch from 27a8d55 to 9b87fe7 Compare May 7, 2018 13:35
@Licht-T
Copy link
Contributor Author

Licht-T commented May 7, 2018

Thanks @jreback, fixed!

@jreback jreback added this to the 0.23.0 milestone May 8, 2018
@jreback jreback merged commit fc50bde into pandas-dev:master May 8, 2018
@jreback
Copy link
Contributor

jreback commented May 8, 2018

thanks @Licht-T

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.

pandas.isnull() has poor behavior for lists
2 participants