Skip to content

BUG+TST: non-optimized apply_index and empty DatetimeIndex #30336

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 3 commits into from
Dec 20, 2019

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Dec 18, 2019

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

tiny comment, can merge and change in a followup if you prefer


except NotImplementedError:
warnings.warn(
"Non-vectorized DateOffset being applied to Series or DatetimeIndex",
PerformanceWarning,
)
result = self.astype("O") + offset
if len(self) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

use not len

Copy link
Member Author

Choose a reason for hiding this comment

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

follow-up, ive got a branch specifically collecting these things

@jreback jreback added Frequency DateOffsets Timezones Timezone data dtype labels Dec 19, 2019
@jreback jreback added this to the 1.0 milestone Dec 19, 2019
@simonjayhawkins simonjayhawkins merged commit 66038e9 into pandas-dev:master Dec 20, 2019
@jbrockmendel jbrockmendel deleted the add-offsets branch December 20, 2019 16:31
jbrockmendel added a commit to jbrockmendel/pandas that referenced this pull request Dec 25, 2019
AlexKirko pushed a commit to AlexKirko/pandas that referenced this pull request Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frequency DateOffsets Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Cannot add non-vectorized DateOffset to empty DatetimeIndex
3 participants