Skip to content

Conversation

@jbrockmendel
Copy link
Member

xref #31055.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

function cleanup looks good; question on the reindex

attrs = self._get_attributes_dict()
attrs.pop("freq", None) # don't preserve freq
values = self._data[:0] # appropriately-dtyped empty array
if isinstance(self, ABCRangeIndex):
Copy link
Member

Choose a reason for hiding this comment

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

What does this need to change for?

Copy link
Member Author

Choose a reason for hiding this comment

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

self._data[:0] is an ndarray for RangeIndex, so we can't pass it to self._simple_new below

@WillAyd WillAyd added the Clean label Jan 16, 2020
@jreback jreback added this to the 1.1 milestone Jan 16, 2020
@jreback jreback merged commit f6747b9 into pandas-dev:master Jan 16, 2020
@jreback
Copy link
Contributor

jreback commented Jan 16, 2020

sure

@jbrockmendel jbrockmendel deleted the simplenew-range branch January 17, 2020 01:08
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