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
When performing a groupby.apply on a dataframe with a float index, I receive a KeyError, depending on whether or not the index has the same ordering as the column I am grouping on.
I confirm the bug and that this is a regression from 0.25. My code worked in 0.25 and after update to 1.1.3 the bug appeared. I did not change my code nor data.
When performing a groupby.apply on a dataframe with a float index, I receive a
KeyError
, depending on whether or not the index has the same ordering as the column I am grouping on.Code Sample
broken
working (mind the sorting of col vs index)
Example traceback
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 043b609
python : 3.8.2.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
Version : Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.1.0.dev0+1708.g043b60920
numpy : 1.18.4
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.0.post20200528
Cython : 0.29.19
pytest : 5.4.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.14.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : 1.3.0
numba : None
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 (043b609)
The text was updated successfully, but these errors were encountered: