You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method was overhauled in 0.25 to push it down from the Python space to C. If you want to poke around the implementation is in pandas.core.groupby.groupby
In [8]: x = pd.DataFrame({'time': pd.date_range('20200101', periods=10, tz='UTC'), 'value': pd.to_timedelta(np.arange(10), unit='s')}).set_index('time')
In [9]: x
Out[9]:
value
time
2020-01-01 00:00:00+00:00 0 days 00:00:00
2020-01-02 00:00:00+00:00 0 days 00:00:01
2020-01-03 00:00:00+00:00 0 days 00:00:02
2020-01-04 00:00:00+00:00 0 days 00:00:03
2020-01-05 00:00:00+00:00 0 days 00:00:04
2020-01-06 00:00:00+00:00 0 days 00:00:05
2020-01-07 00:00:00+00:00 0 days 00:00:06
2020-01-08 00:00:00+00:00 0 days 00:00:07
2020-01-09 00:00:00+00:00 0 days 00:00:08
2020-01-10 00:00:00+00:00 0 days 00:00:09
In [10]: x.resample('2D').quantile(0.99)
TypeError: Cannot cast TimedeltaArray to dtype float64
Code Sample, groupby quantile example
Problem description
The code example used to work in 0.21.1.
In 0.25 I obtain a "TypeError: No matching signature found"
Expected Output
Pandas 0.21.1
idx
1 28 days 21:36:00
2 10 days 00:00:00
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.6.8.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-693.el7.x86_64
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 0.25.3
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 18.1
setuptools : 40.8.0.post20191016
Cython : 0.29.14
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
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
The text was updated successfully, but these errors were encountered: