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

REGR: .clip and datetime w/timezone #11838

Closed
ciamac opened this issue Dec 14, 2015 · 1 comment · Fixed by #11850
Closed

REGR: .clip and datetime w/timezone #11838

ciamac opened this issue Dec 14, 2015 · 1 comment · Fixed by #11850
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Milestone

Comments

@ciamac
Copy link

ciamac commented Dec 14, 2015

There seem to be some incompatibilities with timezones and timestamps in 0.17.1.

For example, here I'm trying to clip a timezone-aware column with a timezone-aware timestamp:

In [224]: import pandas

In [225]: u = pandas.Timestamp('2015-12-01 09:30:30', tz='US/Eastern')

In [226]: print u
2015-12-01 09:30:30-05:00

In [227]: df = pandas.DataFrame({ 'foo' : [ pandas.Timestamp('2015-12-01 09:30:00', tz='US/Eastern'), pandas.Timestamp('2015-12-01 09:31:00', tz='US/Eastern') ] })

In [228]: print df
                        foo
0 2015-12-01 09:30:00-05:00
1 2015-12-01 09:31:00-05:00

In [229]: df['foo'].clip(upper=u)

TypeError: Could not compare [Timestamp('2015-12-01 09:30:30-0500', tz='US/Eastern')] with block values

This code used to work on 0.16.2.

@jreback
Copy link
Contributor

jreback commented Dec 14, 2015

yep, a buggie. pull-requests to remedy are welcomed.

@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype labels Dec 14, 2015
@jreback jreback added this to the Next Major Release milestone Dec 14, 2015
@jreback jreback modified the milestones: 0.18.0, Next Major Release Dec 14, 2015
@jreback jreback changed the title pandas 0.17.1 issues with timezones and timestamps REGR: .clip and datetime w/timezone Dec 14, 2015
jreback added a commit to jreback/pandas that referenced this issue Dec 16, 2015
jreback added a commit that referenced this issue Dec 16, 2015
REGR: Regression in .clip with tz-aware datetimes #11838
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants