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: fix+test DTA/TDA/PA add/sub Index #27726

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

jbrockmendel
Copy link
Member

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

Looking forward to doing a couple of test-cleanup passes.

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.

style comment in the test, otherwise lgtm (can do in a followup if you want), lmk.

def test_dta_add_sub_index(self, tz_naive_fixture):
# Check that DatetimeArray defers to Index classes
dti = date_range("20130101", periods=3, tz=tz_naive_fixture)
dta = dti._data
Copy link
Contributor

Choose a reason for hiding this comment

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

use .array

def test_parr_add_sub_index(self):
# Check that PeriodArray defers to Index on arithmetic ops
pi = pd.period_range("2000-12-31", periods=3)
parr = pi._data
Copy link
Contributor

Choose a reason for hiding this comment

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

same

def test_tda_add_sub_index(self):
# Check that TimedeltaArray defers to Index on arithmetic ops
tdi = TimedeltaIndex(["1 days", pd.NaT, "2 days"])
tda = tdi._data
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@jreback jreback added Compat pandas objects compatability with Numpy or Python functions ExtensionArray Extending pandas with custom dtypes or arrays. Timedelta Timedelta data type Timezones Timezone data dtype Index Related to the Index class or subclasses and removed Timedelta Timedelta data type Timezones Timezone data dtype labels Aug 4, 2019
@jreback jreback added this to the 1.0 milestone Aug 4, 2019
@jbrockmendel
Copy link
Member Author

_data -> array edits made

@jreback
Copy link
Contributor

jreback commented Aug 4, 2019

lgtm ping on green.

@jbrockmendel
Copy link
Member Author

ping

@jreback
Copy link
Contributor

jreback commented Aug 5, 2019

thanks!

@jreback jreback merged commit 9b1c005 into pandas-dev:master Aug 5, 2019
@jbrockmendel jbrockmendel deleted the eaprelim branch August 5, 2019 14:28
quintusdias pushed a commit to quintusdias/pandas_dev that referenced this pull request Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions ExtensionArray Extending pandas with custom dtypes or arrays. Index Related to the Index class or subclasses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants