-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
pandas.rolling.max() shut down reopen #24218
Comments
If you could make your code self-contained and copy/pastable would make it much easier for someone to take a look |
No problem, I have updated it. |
Is there any info needed right now? |
Have you tried on master? IIRC we fixed something similar for windows recently |
I just updated and tried again. The problem still exist. |
Hmm I couldn't reproduce so likely a Windows issue. Let's see if someone else can |
|
I want update one info: |
Hello, I was able to reproduce this on Windows. From some debugging, the issue occurs when you get to:
When it tries to call:
with cfunc refering to "roll_max". I think something goes wrong in: I can reproduce the issue by running the below: import pandas._libs.window
import numpy
values = numpy.linspace(0, 1, 5)
window = 2
minp = 1
index = numpy.array(range(5)).astype(numpy.int64)
closed = "left"
pandas._libs.window.roll_max(values, window, minp, index, closed) The issue does not occur if closed="right" or closed="both" or closed=None. Let me know if I can help debug/resolve. Output of pd.show_versions()
INSTALLED VERSIONScommit: None |
@timhunderwood investigation and PRs are always welcome! |
When I build version 0.24 locally ('0.24.0.dev0+1522.gd106e9975') this issue doesn't occur. Looks like it has already been fixed between 0.23.4 and now. |
@timhunderwood you are running on windows? if want to put up a PR with a validation test (that cycles thru all of the closed options), would be great. |
hi @jreback , yes, I am testing the above on windows. I will try and make a PR to test all the options for closed. |
I had a look at pandas/tests/test_window.py - I think this issue is a duplicate of #21704 and was fixed in #21853. This PR also added Hope that helps - let me know if you think there is something that should be added to those tests. |
thanks |
Code Sample, a copy-pastable example if possible
Problem description
I got a sample data and want to use it to get the rolling max, min, sum etc.
But every time I did rolling max/min on it, the python kernal would shut down and shows 'python.exe has stopped working'
Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.23.0
pytest: 3.5.1
pip: 10.0.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: 1.7.4
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.3
numexpr: 2.6.5
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.3
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.4
lxml: 4.2.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.7
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: 0.1.6
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: