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

Cannot resample with 'D' and tz aware timeseries #1591

Closed
petergx opened this Issue Jul 9, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@petergx

petergx commented Jul 9, 2012

from pandas import *
dr = date_range(start='2012-5-1', end='2012-6-1')
ts = Series(range(len(dr)), dr)
ts_utc = ts.tz_localize('UTC')
ts_local = ts_utc.tz_convert('America/Los_Angeles')
ts_local.resample('D')

yields..

/env/lib/python2.7/site-packages/pandas/tseries/resample.pyc in _get_time_bins(self, axis)
     97         # a little hack
     98         trimmed = False
---> 99         if len(binner) > 2 and binner[-2] == axis[-1] and self.closed == 'right':
    100             binner = binner[:-1]
    101             trimmed = True

/env/lib/python2.7/site-packages/pandas/lib.so in pandas.lib._Timestamp.__richcmp__ (pandas/src/tseries.c:33751)()

Exception: Cannot compare tz-naive and tz-aware timestamps

@ghost ghost assigned wesm Jul 11, 2012

@wesm wesm closed this in 3b0f698 Jul 11, 2012

@wesm

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Jul 11, 2012

Member

Thanks for the report, fixed in git master, will be in forthcoming 0.8.1 bugfix release

Member

wesm commented Jul 11, 2012

Thanks for the report, fixed in git master, will be in forthcoming 0.8.1 bugfix release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment