Skip to content

TST: Empty Series.reindex with tz-aware dtype #23480

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 2 commits into from
Nov 4, 2018

Conversation

mroeschke
Copy link
Member

@pep8speaks
Copy link

Hello @mroeschke! Thanks for submitting the PR.

@codecov
Copy link

codecov bot commented Nov 4, 2018

Codecov Report

Merging #23480 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23480   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files         161      161           
  Lines       51197    51197           
=======================================
  Hits        47220    47220           
  Misses       3977     3977
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 42.27% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/datetimes.py 96.41% <0%> (ø) ⬆️
pandas/core/indexes/api.py 99% <0%> (ø) ⬆️
pandas/core/generic.py 96.81% <0%> (ø) ⬆️
pandas/core/arrays/datetimes.py 98.84% <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 8586644...ac5cd2d. Read the comment docs.

@@ -1197,6 +1197,7 @@ Indexing
- The traceback from a ``KeyError`` when asking ``.loc`` for a single missing label is now shorter and more clear (:issue:`21557`)
- When ``.ix`` is asked for a missing integer label in a :class:`MultiIndex` with a first level of integer type, it now raises a ``KeyError``, consistently with the case of a flat :class:`Int64Index`, rather than falling back to positional indexing (:issue:`21593`)
- Bug in :meth:`DatetimeIndex.reindex` when reindexing a tz-naive and tz-aware :class:`DatetimeIndex` (:issue:`8306`)
- Bug in :meth:`Series.reindex` when reindexing an empty series with a ``datetime64[ns, tz]`` dtype (:issue:`20869`)
Copy link
Member

Choose a reason for hiding this comment

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

Can't call this a bug (or add any kind of whatsnew) when the test you added to break pandas passes on CI. 😉 🎉

Or was this broken in 0.23.4?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't look broken in 0.23.4, but there was a never a whatsnew note that this was fixed.

# GH 20869
result = Series(dtype='datetime64[ns, UTC]').reindex([0, 1])
expected = Series([pd.NaT] * 2, dtype='datetime64[ns, UTC]')
tm.assert_equal(result, expected)
Copy link
Contributor

Choose a reason for hiding this comment

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

move in pandas/tests/series where reindex tests are

@jreback jreback added Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype labels Nov 4, 2018
@jreback jreback added this to the 0.24.0 milestone Nov 4, 2018
@jreback jreback merged commit 6db8d19 into pandas-dev:master Nov 4, 2018
@jreback
Copy link
Contributor

jreback commented Nov 4, 2018

thanks

@mroeschke mroeschke deleted the timezone_dtype_empty_reindex branch November 4, 2018 20:44
JustinZhengBC pushed a commit to JustinZhengBC/pandas that referenced this pull request Nov 14, 2018
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
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
Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty Series[datetime64[ns, tz]].reindex fails
4 participants