Skip to content

BUG: TDI/DTI _shallow_copy creating invalid arrays #30764

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 1 commit into from
Jan 7, 2020

Conversation

jbrockmendel
Copy link
Member

Following this we should be able to use shallow_copy in indexes.extension more, which will help with perf (xref #30717)

@@ -29,6 +29,25 @@ def test_freq_validation_with_nat(self, dt_cls):
with pytest.raises(ValueError, match=msg):
dt_cls([pd.NaT, pd.Timestamp("2011-01-01").value], freq="D")

# TODO: better place for tests shared by DTI/TDI?
Copy link
Contributor

Choose a reason for hiding this comment

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

make indexes/datetimelike (there is a datetimelike.py now though)?

pd.timedelta_range("1 Day", periods=5),
],
)
def test_shallow_copy_inherits_array_freq(self, index):
Copy link
Contributor

Choose a reason for hiding this comment

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

note that we appear to have very limited shallow_copy tests now :-> so this is good

@jreback jreback added ExtensionArray Extending pandas with custom dtypes or arrays. Index Related to the Index class or subclasses Timedelta Timedelta data type Datetime Datetime data dtype labels Jan 7, 2020
@jreback jreback added this to the 1.0 milestone Jan 7, 2020
@jreback jreback merged commit 613df15 into pandas-dev:master Jan 7, 2020
@jreback
Copy link
Contributor

jreback commented Jan 7, 2020

thanks, some comments

@jbrockmendel jbrockmendel deleted the bug-shallow_copy branch January 7, 2020 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype ExtensionArray Extending pandas with custom dtypes or arrays. Index Related to the Index class or subclasses Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants