REGR: .clip and datetime w/timezone #11838

Closed
ciamac opened this Issue Dec 14, 2015 · 1 comment

Comments

Projects
None yet
2 participants

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.

Contributor

jreback commented Dec 14, 2015

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

jreback added this to the Next Major Release milestone Dec 14, 2015

@jreback jreback modified the milestone: 0.18.0, Next Major Release Dec 14, 2015

jreback changed the title from pandas 0.17.1 issues with timezones and timestamps to REGR: .clip and datetime w/timezone Dec 14, 2015

@jreback jreback added a commit to jreback/pandas that referenced this issue Dec 16, 2015

@jreback jreback REGR: Regression in .clip with tz-aware datetimes #11838 1880400

jreback closed this in #11850 Dec 16, 2015

@jreback jreback added a commit that referenced this issue Dec 16, 2015

@jreback jreback Merge pull request #11850 from jreback/clip
REGR: Regression in .clip with tz-aware datetimes #11838
d173946
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment