-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pandas.DataFrame.interpolate fails with high value of limit
argument
#34936
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
Upon further testing, it seems that the issue doesn't come from the pandas versions but from the python version It looks like it works just fine with python 3.6 but gets the error with 3.7. I updated the original description above |
Thanks @monstrorivas for the report. not able to reproduce on Python 3.7.7 on Linux or Python 3.8.3 on Windows. can you post the full traceback? |
Here's the traceback of the error.
|
Thanks @monstrorivas for the detail. There's an open PR, #34727, that doesn't use the function where the error is originating, pandas\core\missing.py in _rolling_window(a, window) |
Thanks @simonjayhawkins for the information on that PR. After your comment, I did more testing on different systems. I can confirm that I can't reproduce it either on Linux with Python 3.7.3 Also, I just tried on another Windows system with Python 3.7.4 and could NOT reproduce it. I'm a bit confused on what may be triggering this issue |
The error is originating from NumPy. so could be down the Numpy version being used. |
ok... I think I figured out what's causing it I was able to reproduce it on different Windows machines with Python 3.7.4 (32-bit). When I switch to the 64-bit version there is no issue. Now that I think about it, the ValueError starts to make sense. What doesn't makes sense from a user perspective is that with |
Thanks for investigating further |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
An error is produced when specifying a large limit in pandas.DataFrame.Interpolate
The error is NOT present in pandas 1.0.1 but it is present at least in 1.0.4 and 1.0.5If the limit is set to None, there is no error... even when the interpolated consecutive nans is larger than the limit that fails
Error:
The error is with Python 3.7 but not with Python 3.6
Expected Output
The expected output is what pandas v1.0.1 produces.In python 3.6, specifying a large value of limit doesn't result in a ValueError
This runs in v1.0.1
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.4.final.0
python-bits : 32
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : None.None
pandas : 1.0.5
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.1
Cython : 0.29.20
pytest : 5.4.3
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.4.3
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: