Skip to content

BUG: Fix subtraction with timezone Series #12302

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

Closed

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Feb 12, 2016

Addresses issue in #12290 with timezone Series subtraction in which single element Series
objects containing tz-aware objects would return a timedelta of zero, even though it visually could not be the case.

The bug was traced to the conversion of the contained timezones to UTC, in which the method call was somehow returning NaT, even though attempts to replicate that behaviour were unsuccessful. This new
method call fixes the issue and is in some ways more intuitive given the comment above the conversions.

@jreback
Copy link
Contributor

jreback commented Feb 12, 2016

fixed by #12306

@jreback jreback added Bug Timezones Timezone data dtype labels Feb 12, 2016
@kawochen
Copy link
Contributor

ah sorry didn't realize there was already a PR. thought I was quick!

@jreback
Copy link
Contributor

jreback commented Feb 12, 2016

ahh, but I think @kawochen soln fixes the root of the problem.

Fixes unusual bug with timezone Series
subtraction in which single element Series
objects containing tz-aware objects would
return a timedelta of zero, even though it
visually could not be the case.

The bug was traced to the conversion of
the contained timezones to UTC, in which
the method call was somehow returning NaT,
even though attempts to replicate that
behaviour were unsuccessful. This new
method call fixes the issue and is in some
ways more intuitive given the comment above
the conversions.

Closes pandas-devgh-12290.
@gfyoung gfyoung force-pushed the tz_series_diff_patch branch from 4b1a39b to 29581d1 Compare February 12, 2016 04:59
@gfyoung
Copy link
Member Author

gfyoung commented Feb 12, 2016

Closing this PR because #12306 provides a better solution to the issue.

@gfyoung gfyoung closed this Feb 12, 2016
@gfyoung gfyoung deleted the tz_series_diff_patch branch February 12, 2016 06:37
@gfyoung gfyoung added this to the No action milestone Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants