Skip to content

Series or DataFrame asof() fails when the index is a PeriodIndex and the value is a datetime or Timestamp #1883

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
ijmcf opened this issue Sep 10, 2012 · 2 comments
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@ijmcf
Copy link

ijmcf commented Sep 10, 2012

For example:

pi = pandas.period_range('2012/09/10', periods=10, freq='D')
s = pandas.TimeSeries(data=range(len(pi)), index=pi)
dt = pandas.Timestamp('2012/09/13')

s[dt]
3

s.asof(dt)
TypeError: Cannot compare Timestamp with 25-May-2012

@wesm
Copy link
Member

wesm commented Sep 16, 2012

I'll see that this is fixed in time for 0.9

@ghost ghost assigned changhiskhan Sep 17, 2012
@wesm
Copy link
Member

wesm commented Sep 17, 2012

All set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

3 participants