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

Fix tzawareness_compat for DatetimeIndex comparisons with NaT #19276

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

jbrockmendel
Copy link
Member

ATM pd.date_range('2016-01-01', periods=1, tz='US/Pacific') < pd.NaT raises TypeError because NaT is tz-naive. This fixes that.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@codecov
Copy link

codecov bot commented Jan 17, 2018

Codecov Report

Merging #19276 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19276      +/-   ##
==========================================
- Coverage   91.56%   91.53%   -0.03%     
==========================================
  Files         148      148              
  Lines       48874    48876       +2     
==========================================
- Hits        44751    44741      -10     
- Misses       4123     4135      +12
Flag Coverage Δ
#multiple 89.91% <100%> (-0.03%) ⬇️
#single 41.69% <66.66%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/datetimes.py 95.24% <100%> (ø) ⬆️
pandas/plotting/_converter.py 65.22% <0%> (-1.74%) ⬇️

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 04a6815...c97e166. Read the comment docs.

@jreback jreback added Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Jan 18, 2018
@jreback jreback added this to the 0.23.0 milestone Jan 18, 2018
@jreback jreback merged commit 94cdc16 into pandas-dev:master Jan 18, 2018
@jreback
Copy link
Contributor

jreback commented Jan 18, 2018

thanks!

@jbrockmendel jbrockmendel deleted the dti_awareness_nat branch February 11, 2018 21:59
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants