Skip to content

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)

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