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

Propogating NaN values when using str.split (#18450) #18462

Merged
merged 2 commits into from
Nov 25, 2017

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Nov 24, 2017

@codecov
Copy link

codecov bot commented Nov 24, 2017

Codecov Report

Merging #18462 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18462      +/-   ##
==========================================
- Coverage   91.35%   91.31%   -0.05%     
==========================================
  Files         163      163              
  Lines       49695    49698       +3     
==========================================
- Hits        45401    45382      -19     
- Misses       4294     4316      +22
Flag Coverage Δ
#multiple 89.11% <100%> (-0.03%) ⬇️
#single 39.66% <0%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/strings.py 98.47% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 63.44% <0%> (-1.82%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️
pandas/core/indexes/datetimes.py 95.39% <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 e6eac0b...d64995a. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 24, 2017

Codecov Report

Merging #18462 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18462      +/-   ##
==========================================
- Coverage   91.33%   91.32%   -0.02%     
==========================================
  Files         163      163              
  Lines       49752    49767      +15     
==========================================
+ Hits        45443    45449       +6     
- Misses       4309     4318       +9
Flag Coverage Δ
#multiple 89.12% <100%> (ø) ⬆️
#single 40.71% <0%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/strings.py 98.47% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️
pandas/core/indexes/multi.py 96.44% <0%> (+0.03%) ⬆️

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 be66ef8...5c644e8. Read the comment docs.

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Strings String extension data type and string data labels Nov 25, 2017
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.

add a whatsnew note for 0.21.1

s = Series(["foo,bar,baz", NA])
result = s.str.split(",", expand=True)
exp = DataFrame([["foo", "bar", "baz"], [NA, NA, NA]])
tm.assert_frame_equal(result, exp)
Copy link
Contributor

Choose a reason for hiding this comment

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

make this a separate test. this doesn't fail currently (because of the assert_frame_equal comparisons), so add an additional check that assert all nans are actually nan

@jreback jreback added this to the 0.21.1 milestone Nov 25, 2017
@jreback jreback merged commit 20f6512 into pandas-dev:master Nov 25, 2017
@jreback
Copy link
Contributor

jreback commented Nov 25, 2017

thanks @WillAyd nice. keep em coming!

@WillAyd WillAyd deleted the split-nan-prop branch November 25, 2017 21:51
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 8, 2017
TomAugspurger pushed a commit that referenced this pull request Dec 11, 2017
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 Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

str.split on np.nan gives np.nan in one column but None in another column
3 participants