-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
interpolate w/ method=time does not work with timedeltas #6424
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
Comments
unless their is real interest, won't do this |
Can we leave this open then and mark as milestone "Someday"? |
came up on SO http://stackoverflow.com/q/34315753/1240268 |
Run into this today as well. |
I have also run into this today. |
If someone is interested in working on this, it'd follow a similar pattern to #14737 (convert to i8, interpolate, convert back to timedelta). |
@TomAugspurger i can take this up post #14737 :) |
@TomAugspurger is this still an issue? when i run the code fragment given in the initial post of this issue, i get this output
|
I filed this a long time ago, so bear with me. This does not seem to work: pd.DataFrame({'v':[1,np.nan,5]},index=pd.to_timedelta([1,2,3], unit="d")).interpolate(method="time") whereas this does: pd.DataFrame({'v':[1,np.nan,5]},index=pd.to_datetime([1,2,3], unit="d")).interpolate(method="time") I am seeing the same issue as in the above linked SO post. |
@cancan101 so it fails when we try to pass timedelta, is that correct? |
What do you mean? pd.DataFrame({'v':[1,np.nan,5]},index=pd.to_timedelta([1,2,3], unit="d")) |
@cancan101 yes that is fine, what i am trying to say is that it fails when you try to interpolate the timedelta data, pd.DataFrame({'v':[1,np.nan,5]},index=pd.to_timedelta([1,2,3], unit="d")).interpolate(method="time") whereas when you call interpolate for datetime data, it works. That is the difference between the two lines that you've posted earlier (as examples of what works and what doesnt), right? |
yes |
added this PR, #14799 |
The text was updated successfully, but these errors were encountered: