We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I encountered a similar issue to (closed) #3592 .
When trying to resample a dataframe with a localized Datetime Index using the how method:
rng = pd.date_range('1/1/2011', periods=20000, freq='H') rng = rng.tz_localize('EST') ts = pd.DataFrame(index=rng) ts['first']=np.random.randn(len(rng)) ts['second']=np.cumsum(np.random.randn(len(rng))) ts2=ts.resample('A', how={'first':np.sum, 'second':np.mean}) *File "tslib.pyx", line 465, in pandas.tslib._Timestamp.__richcmp__ (pandas\tslib.c:9313) *TypeError: can't compare offset-naive and offset-aware datetimes
For other (,lower) frequencies like "M" the same code works fine and if I just use
how=np.mean
or just use 1 column in the dict
how={'first':np.mean}
it works too.
python 2.7.5 pandas 0.13.1
EDIT: Changed to include full example
The text was updated successfully, but these errors were encountered:
can you provide the starting dataframe (code to recreate, doesn't have to be long), that reproduces this problem?
Sorry, something went wrong.
Changed the example so you can recreate it now!
If that means anything: with pandas 0.12 i get a TypeError, with pandas 0.13.1 it changed to ValueError (but the issue is the same).
gr8...thanks...will get to it for 0.14
jreback
Successfully merging a pull request may close this issue.
I encountered a similar issue to (closed) #3592 .
When trying to resample a dataframe with a localized Datetime Index using the how method:
For other (,lower) frequencies like "M" the same code works fine and if I just use
or just use 1 column in the dict
it works too.
python 2.7.5
pandas 0.13.1
EDIT: Changed to include full example
The text was updated successfully, but these errors were encountered: