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

Backport PR #38120: API: preserve freq in DTI/TDI.factorize #38185

Conversation

simonjayhawkins
Copy link
Member

Backport PR #38120

@simonjayhawkins simonjayhawkins added this to the 1.1.5 milestone Nov 30, 2020
@simonjayhawkins
Copy link
Member Author

@jbrockmendel if you can give this a quick eyeball before I merge. several merge conflicts where I could have gone wrong. see also comments in #38137

@jbrockmendel
Copy link
Member

taking a look now

@@ -766,6 +767,9 @@ def _check_timedeltalike_freq_compat(self, other):

raise raise_on_incompatible(self, other)

def factorize(self, na_sentinel=-1):
return ExtensionArray.factorize(self, na_sentinel=na_sentinel)

Copy link
Member

Choose a reason for hiding this comment

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

why is this necessary?

@jbrockmendel
Copy link
Member

The PeriodArray thing looks unnecessary but harmless, otherwise LGTM

@simonjayhawkins
Copy link
Member Author

The PeriodArray thing looks unnecessary but harmless, otherwise LGTM

see #38137 (comment)

@jbrockmendel
Copy link
Member

makes sense, thanks

@simonjayhawkins simonjayhawkins merged commit 2daf4cd into pandas-dev:1.1.x Nov 30, 2020
@simonjayhawkins simonjayhawkins deleted the backport-of-pr-38120-on-1.1.x branch November 30, 2020 18:27
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.

2 participants