BUG: RollingGroupby no longer respects sort being disabled · Issue #36889 · pandas-dev/pandas (original) (raw)


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