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

BUG: Handle all-NA blocks in concat #20382

Merged
merged 3 commits into from
Mar 18, 2018

Conversation

TomAugspurger
Copy link
Contributor

Previously we special cased all-na blocks. We should only do that for
non-extension dtypes.

Previously we special cased all-na blocks. We should only do that for
non-extension dtypes.
@TomAugspurger TomAugspurger added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Reshaping Concat, Merge/Join, Stack/Unstack, Explode ExtensionArray Extending pandas with custom dtypes or arrays. labels Mar 16, 2018
@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 16, 2018
@@ -25,6 +25,21 @@ def test_concat(self, data, in_frame):
assert dtype == data.dtype
assert isinstance(result._data.blocks[0], ExtensionBlock)

@pytest.mark.parametrize('in_frame', [True])
Copy link
Member

Choose a reason for hiding this comment

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

Should this be [True, False]? If False isn't supported yet, might be nice to write a quick comment, as separate code paths for False exist in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, was debugging that case. Thanks.

@codecov
Copy link

codecov bot commented Mar 16, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@13ae107). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #20382   +/-   ##
=========================================
  Coverage          ?   91.79%           
=========================================
  Files             ?      152           
  Lines             ?    49184           
  Branches          ?        0           
=========================================
  Hits              ?    45148           
  Misses            ?     4036           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.17% <ø> (?)
#single 41.83% <ø> (?)
Impacted Files Coverage Δ
pandas/core/internals.py 95.54% <ø> (ø)

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 13ae107...c12a24d. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Mar 16, 2018

lgtm.

@TomAugspurger
Copy link
Contributor Author

The linting error was fixed on master: pandas/_libs/tslibs/period.pyx:1358:12: W291 trailing whitespace

@TomAugspurger TomAugspurger merged commit aaa4d90 into pandas-dev:master Mar 18, 2018
@TomAugspurger TomAugspurger deleted the na-concat-bug branch March 18, 2018 11:44
nehiljain added a commit to nehiljain/pandas that referenced this pull request Mar 21, 2018
…ame_describe

* upstream/master: (158 commits)
  Add link to "Craft Minimal Bug Report" blogpost (pandas-dev#20431)
  BUG: fixed json_normalize for subrecords with NoneTypes (pandas-dev#20030) (pandas-dev#20399)
  BUG: ExtensionArray.fillna for scalar values (pandas-dev#20412)
  DOC" update the Pandas core window rolling count docstring" (pandas-dev#20264)
  DOC: update the pandas.DataFrame.plot.hist docstring (pandas-dev#20155)
  DOC: Only use ~ in class links to hide prefixes. (pandas-dev#20402)
  Bug: Allow np.timedelta64 objects to index TimedeltaIndex (pandas-dev#20408)
  DOC: add disallowing of Series construction of len-1 list with index to whatsnew (pandas-dev#20392)
  MAINT: Remove weird pd file
  DOC: update the Index.isin docstring (pandas-dev#20249)
  BUG: Handle all-NA blocks in concat (pandas-dev#20382)
  DOC: update the pandas.core.resample.Resampler.fillna docstring (pandas-dev#20379)
  BUG: Don't raise exceptions splitting a blank string (pandas-dev#20067)
  DOC: update the pandas.DataFrame.cummax docstring (pandas-dev#20336)
  DOC: update the pandas.core.window.x.mean docstring (pandas-dev#20265)
  DOC: update the api.types.is_number docstring (pandas-dev#20196)
  Fix linter (pandas-dev#20389)
  DOC: Improved the docstring of pandas.Series.dt.to_pytimedelta (pandas-dev#20142)
  DOC: update the pandas.Series.dt.is_month_end docstring (pandas-dev#20181)
  DOC: update the window.Rolling.min docstring (pandas-dev#20263)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants