Skip to content

BUG: use astype for scipy datetime interpolation #5998

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

Merged
1 commit merged into from
Jan 19, 2014

Conversation

TomAugspurger
Copy link
Contributor

Closes #5975 (again), with the issue raised at #5977 (comment).

I'm using astype instead of view now, as Jeff suggested. I also didn't realize that asi8 was a method on all Indexes, and not just DatetimeIndexes. So instead of checking for that attr, I just check if it's a DatetimeIndex.

@y-p this should fix the doc example. It built for me anyway, but I've had trouble building the docs off my working branch.

@jreback
Copy link
Contributor

jreback commented Jan 19, 2014

this might break for a PeriodIndex
you can do

getattr(x,'is_all_dates',False)

instead of doing isinstance which will catch both types of indexes

@TomAugspurger
Copy link
Contributor Author

Thanks, I forgot about PeriodIndices. There's no need for a release notes entry right?

@jreback
Copy link
Contributor

jreback commented Jan 19, 2014

nope

ghost pushed a commit that referenced this pull request Jan 19, 2014
BUG: use astype for scipy datetime interpolation
@ghost ghost merged commit 086c3e0 into pandas-dev:master Jan 19, 2014
@ghost
Copy link

ghost commented Jan 19, 2014

Thanks, added a regression test.

@TomAugspurger TomAugspurger deleted the interpolate-datetime-fix branch November 3, 2016 12:37
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Scipy interpolate methods are not datetime64 aware
2 participants