Skip to content

BUG: RollingGroupby no longer respects sort being disabled #36889

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

Closed
2 of 3 tasks
cpmbailey opened this issue Oct 5, 2020 · 5 comments · Fixed by #36911
Closed
2 of 3 tasks

BUG: RollingGroupby no longer respects sort being disabled #36889

cpmbailey opened this issue Oct 5, 2020 · 5 comments · Fixed by #36911
Labels
Bug Regression Functionality that used to work in a prior pandas version Window rolling, ewma, expanding
Milestone

Comments

@cpmbailey
Copy link

  • 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.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

pd.DataFrame({'foo': [2,1], 'bar': [2, 1]}).groupby('foo', sort=False).rolling(1).min()
       foo  bar
foo
1   1  1.0  1.0
2   0  2.0  2.0

Problem description

RollingGroupby no longer respects sort being disabled

Expected Output

Behaviour in 1.0.5

pd.DataFrame({'foo': [2,1], 'bar': [2, 1]}).groupby('foo', sort=False).rolling(1).min()
       foo  bar
foo
2   0  2.0  2.0
1   1  1.0  1.0

Output of pd.show_versions()

INSTALLED VERSIONS

commit : 2a7d332
python : 3.6.3.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.18362
machine : AMD64
processor : Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None

pandas : 1.1.2
numpy : 1.19.2
pytz : 2020.1
dateutil : 2.8.1
pip : 9.0.1
setuptools : 50.3.0
Cython : 0.29.21
pytest : 6.0.2
hypothesis : None
sphinx : 1.7.9
blosc : 1.7.0
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.8.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : 0.4.1
fastparquet : None
gcsfs : None
matplotlib : 3.3.0
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 1.0.1
pytables : None
pyxlsb : None
s3fs : 0.3.3
scipy : 1.5.2
sqlalchemy : 1.2.12
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
numba : 0.46.0

@cpmbailey cpmbailey added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 5, 2020
@Rohith295
Copy link
Contributor

take

@Rohith295
Copy link
Contributor

@cpmbailey the expected output for the code sample
pd.DataFrame({'foo': [2,1], 'bar': [2, 1]}).groupby('foo', sort=False).rolling(1).min()

foo
2   0  2.0  2.0
1   1  1.0  1.0

@mroeschke
Copy link
Member

Do you mind if I take this issue @Rohith295? I broke this in version 1.1 in this PR and have a good idea where this needs fixing: #34052

@Rohith295
Copy link
Contributor

Do you mind if I take this issue @Rohith295? I broke this in version 1.1 in this PR and have a good idea where this needs fixing: #34052

Yes. Please go ahead. I will unassign myself. @mroeschke

@Rohith295 Rohith295 removed their assignment Oct 6, 2020
simonjayhawkins added a commit to simonjayhawkins/pandas that referenced this issue Oct 6, 2020
@simonjayhawkins simonjayhawkins added Regression Functionality that used to work in a prior pandas version Window rolling, ewma, expanding and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 6, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1.4 milestone Oct 6, 2020
@simonjayhawkins
Copy link
Member

Do you mind if I take this issue @Rohith295? I broke this in version 1.1 in this PR and have a good idea where this needs fixing: #34052

can confirm first bad commit: [bad52a9] PERF: Use Indexers to implement groupby rolling (#34052)

https://github.com/simonjayhawkins/pandas/runs/1214317396?check_suite_focus=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Regression Functionality that used to work in a prior pandas version Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants