Skip to content

Modernize indexes.timedeltas, indexes.datetimeindex #18161

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 8, 2017

Conversation

jbrockmendel
Copy link
Member

Two things here. They should be separate PRs, but so it goes.

indexes.datetimes and indexes.periods use a _field_accessor pattern to define several properties in their index classes. This updates TimedeltaIndex to use the same pattern, getting rid of the _get_field method that was used before.

indexes.datetimes has a _utc() function that I think is designed to lazily import pytz. That ship has sailed elsewhere, so this removes that extra call.

@codecov
Copy link

codecov bot commented Nov 8, 2017

Codecov Report

Merging #18161 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18161      +/-   ##
==========================================
+ Coverage   91.41%   91.41%   +<.01%     
==========================================
  Files         163      163              
  Lines       50132    50123       -9     
==========================================
- Hits        45827    45821       -6     
+ Misses       4305     4302       -3
Flag Coverage Δ
#multiple 89.22% <100%> (+0.02%) ⬆️
#single 40.34% <57.89%> (-0.05%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/timedeltas.py 91.15% <100%> (-0.04%) ⬇️
pandas/core/indexes/datetimes.py 95.48% <100%> (-0.04%) ⬇️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️
pandas/plotting/_converter.py 65.2% <0%> (+1.81%) ⬆️

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 488db6f...6d5ec4b. Read the comment docs.

@jreback jreback added the Clean label Nov 8, 2017
@jreback jreback added this to the 0.21.1 milestone Nov 8, 2017
@jreback jreback merged commit 079f678 into pandas-dev:master Nov 8, 2017
@jreback
Copy link
Contributor

jreback commented Nov 8, 2017

thsnks

watercrossing pushed a commit to watercrossing/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 8, 2017
@jbrockmendel jbrockmendel deleted the idx_utc2 branch December 8, 2017 19:40
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants