-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: fix PeriodIndex join with DatetimeIndex stack overflow #5101
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
BUG: fix PeriodIndex join with DatetimeIndex stack overflow #5101
Conversation
'can only call with other PeriodIndex-ed ' | ||
'objects'): | ||
for join in joins: | ||
df.columns.join(s.index, how=join) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should swap the loop and with here
return self.values.copy() | ||
else: # pragma: no cover | ||
raise ValueError('Cannot cast PeriodIndex to dtype %s' % dtype) | ||
return Index(self.values.copy(), dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why copy instead of view here? I know that's what was there before, just strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was just about to ask that actually...@jreback?
looks good to me |
ok too |
…overflow BUG: fix PeriodIndex join with DatetimeIndex stack overflow
closes #3899.