Skip to content

BUG: all-na corner case for str.cat #24045

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 3 commits into from
Dec 2, 2018
Merged

Conversation

h-vetinari
Copy link
Contributor

@h-vetinari h-vetinari commented Dec 2, 2018

@pep8speaks
Copy link

Hello @h-vetinari! Thanks for submitting the PR.

@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #24045 into master will increase coverage by 49.88%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #24045       +/-   ##
===========================================
+ Coverage   42.46%   92.34%   +49.88%     
===========================================
  Files         161      161               
  Lines       51557    51557               
===========================================
+ Hits        21892    47612    +25720     
+ Misses      29665     3945    -25720
Flag Coverage Δ
#multiple 90.74% <100%> (?)
#single 42.46% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/strings.py 98.58% <100%> (+65.58%) ⬆️
pandas/core/computation/pytables.py 92.37% <0%> (+0.3%) ⬆️
pandas/io/pytables.py 92.3% <0%> (+0.92%) ⬆️
pandas/util/_test_decorators.py 93.24% <0%> (+4.05%) ⬆️
pandas/compat/__init__.py 58.36% <0%> (+8.17%) ⬆️
pandas/core/config_init.py 99.24% <0%> (+9.84%) ⬆️
pandas/core/reshape/util.py 100% <0%> (+11.53%) ⬆️
pandas/compat/numpy/__init__.py 92.85% <0%> (+14.28%) ⬆️
pandas/core/computation/common.py 85.71% <0%> (+14.28%) ⬆️
pandas/core/api.py 100% <0%> (+14.81%) ⬆️
... and 120 more

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 b45eb26...f2c4943. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #24045 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24045   +/-   ##
=======================================
  Coverage   42.45%   42.45%           
=======================================
  Files         161      161           
  Lines       51561    51561           
=======================================
  Hits        21888    21888           
  Misses      29673    29673
Flag Coverage Δ
#single 42.45% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/strings.py 33% <0%> (ø) ⬆️
pandas/core/frame.py 38.7% <0%> (ø) ⬆️

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 6dd130a...474ddb2. Read the comment docs.

@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Strings String extension data type and string data labels Dec 2, 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.

looks good. ping on green.

@@ -1364,6 +1364,7 @@ Strings
- Bug in :meth:`Index.str.partition` was not nan-safe (:issue:`23558`).
- Bug in :meth:`Index.str.split` was not nan-safe (:issue:`23677`).
- Bug :func:`Series.str.contains` not respecting the ``na`` argument for a ``Categorical`` dtype ``Series`` (:issue:`22158`)
- Bug in :meth:`Index.str.cat` when the result contained only NaN (:issue:`24044`)
Copy link
Contributor

Choose a reason for hiding this comment

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

double backticks on NaN


# all-NA target
expected = Index([np.nan] * 4, dtype='object')
expected = expected if box == Index else Series(expected,
Copy link
Contributor

Choose a reason for hiding this comment

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

use the

if box == Series:
     .....

for this one

@jreback jreback added this to the 0.24.0 milestone Dec 2, 2018
@h-vetinari
Copy link
Contributor Author

@jreback Ping on green.

@jreback jreback merged commit 7a885ee into pandas-dev:master Dec 2, 2018
@jreback
Copy link
Contributor

jreback commented Dec 2, 2018

thanks @h-vetinari

@h-vetinari h-vetinari deleted the str_cat_na branch December 2, 2018 23:14
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: .str.cat for all-na corner case
3 participants