Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DataFrame interpolate method error when using keyword limit #7173
Comments
|
pls post a complete example with dataset (or a link), code you use to read in and what reproduces the error, and pd.``print_versions() the more info the better |
jreback
added Bug Missing-data
labels
May 19, 2014
jreback
added this to the
0.14.1
milestone
May 19, 2014
jreback
modified the milestone: 0.15.0, 0.14.1
Jun 26, 2014
ianp
commented
Jul 2, 2014
|
I've just run across the same issue, a small example is pasted in below. I should also note that although in this code resampling the series seems to fix the issue, I have other code for which this is not the case (I'll try to get an better example that I'm able to share). import pandas as pd
input_data = {
pd.datetime(2012, 1, 7): 234.0,
pd.datetime(2012, 1,14): 123.4,
pd.datetime(2012, 1,21): 124.1,
pd.datetime(2012, 1,28): 346.3,
pd.datetime(2012, 3,10): 235.7,
pd.datetime(2012, 3,24): 346.2
}
s = pd.Series(input_data)
print s
print s.interpolate()
print s.resample('W-SAT').interpolate(limit=1)
# fails!
print s.interpolate(limit=1)I've tried this with Pandas versions 0.13.1 and 0.14 both running under python 2.7.6. |
|
@ianp this seems to be a different issue, though the results look ok to me. Pls open a new issue with a reproducing case (and the expected output) |
ianp
commented
Jul 7, 2014
|
Done, issue #7679. |
jreback
modified the milestone: 0.15.0, 0.15.1
Jul 7, 2014
jreback
referenced
this issue
Aug 8, 2014
Closed
BUG: Interpolation with 'limit' argument gives error when there are no nan values in the data series #7962
|
@TomAugspurger have a look? |
JohnSmizz commentedMay 19, 2014
Hi-
interpolate works fine on most of my datasets but I've just encountered for the first time a new error when attempting to run this method.
I'm not sure how/if its sensible to paste the dataset I used somehow on here (along with the datetimeindex) so you can attempt to replicate this error -- happy to do so if you tell me how.
This error only occurs when I place a restriction via the limit keyword. Eg.
temp1df is a dataframe with a datetimeindex with a 208 count, and a datetimeindex of 576 length.
I am running 0.13.1 on 3.3.3 on a windows machine.
Full traceback below: