Skip to content
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

RollingGroupBy.quantile ignores interpolation argument #28779

Closed
pwsiegel opened this issue Oct 3, 2019 · 0 comments · Fixed by #29567
Closed

RollingGroupBy.quantile ignores interpolation argument #28779

pwsiegel opened this issue Oct 3, 2019 · 0 comments · Fixed by #29567
Labels
API Design quantile quantile method Window rolling, ewma, expanding
Milestone

Comments

@pwsiegel
Copy link
Contributor

pwsiegel commented Oct 3, 2019

Code Sample, a copy-pastable example if possible

df = pd.DataFrame([
    ['a', 1], ['a', 2], ['a', 3],
    ['b', 1], ['b', 3], ['b', 5]
], columns=['key', 'val'])
print(df.groupby('key').rolling(2).quantile(.4, interpolation='lower'))

Problem description

The keyword argument interpolation is ignored - no matter what value it is set to, the default (linear) interpolation is used. This problem only applies to RollingGroupBy.quantile - GroupBy.quantile and Rolling.quantile both appear to work as expected.

Expected Output

       val
key       
a   0  NaN
    1  1.0
    2  2.0
b   3  NaN
    4  1.0
    5  3.0

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Darwin
OS-release : 17.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 0.25.1
numpy : 1.17.2
pytz : 2019.2
dateutil : 2.8.0
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.1
IPython : 7.8.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None

@mroeschke mroeschke added API Design Window rolling, ewma, expanding labels Oct 7, 2019
@jbrockmendel jbrockmendel added the quantile quantile method label Oct 22, 2019
@jreback jreback added this to the 1.0 milestone Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design quantile quantile method Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants