Skip to content

Fix PeriodIndex._shallow_copy allowing object-dtype #30713

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
Jan 6, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added Constructors Series/DataFrame/Index/pd.array Constructors Index Related to the Index class or subclasses Period Period data type labels Jan 5, 2020
@jreback jreback added this to the 1.0 milestone Jan 5, 2020
# I think that once all of Datetime* are EAs, we can simplify
# this quite a bit.
values = period_array(values, freq=self.freq)
raise TypeError(type(values), getattr(values, "dtype", None))
Copy link
Contributor

Choose a reason for hiding this comment

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

what triggers this?

Copy link
Member Author

Choose a reason for hiding this comment

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

After this PR, this is never reached. In master we get there with ndarray[object] via dropna and symmetric_difference. The PeriodIndex set ops PRs over the last couple days have been aimed at this

Copy link
Contributor

Choose a reason for hiding this comment

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

ok can u make a comment about this then

should this just be an assertion ?

@jreback jreback merged commit a94ff3b into pandas-dev:master Jan 6, 2020
@jreback
Copy link
Contributor

jreback commented Jan 6, 2020

thanks

@jbrockmendel jbrockmendel deleted the share-more branch January 6, 2020 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors Index Related to the Index class or subclasses Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants