RollingGroupBy.quantile
ignores interpolation
argument · Issue #28779 · pandas-dev/pandas (original) (raw)
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