-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: df.groupby().resample()[[cols]] raise KeyError when resampling on index #50840
Closed
3 tasks done
Labels
Comments
czroth
added
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
Jan 18, 2023
czroth
added a commit
to czroth/pandas
that referenced
this issue
Jan 18, 2023
5 tasks
czroth
added a commit
to czroth/pandas
that referenced
this issue
Jan 19, 2023
czroth
added a commit
to czroth/pandas
that referenced
this issue
Jan 19, 2023
czroth
added a commit
to czroth/pandas
that referenced
this issue
Jan 19, 2023
Merged
5 tasks
czroth
added a commit
to czroth/pandas
that referenced
this issue
Jan 20, 2023
mroeschke
pushed a commit
that referenced
this issue
Jan 23, 2023
…licit list of columns. (#50876) * Add failing test reproducing groupby-resample KeyError (#50840) * Fix groupby-resample KeyError (#50840) by adding None check. * Update whatsnew for #50840 * Improve coverage with multi and missing column groupby-resample tests. * Refactor groupby-resample tests via TestCase to remove duplicate code. * Revert "Refactor groupby-resample tests via TestCase to remove duplicate code." This reverts commit d522606. * Fix typo in bug fix entry for #50840 in doc/source/whatsnew/v2.0.0.rst
pooja-subramaniam
pushed a commit
to pooja-subramaniam/pandas
that referenced
this issue
Jan 25, 2023
…licit list of columns. (pandas-dev#50876) * Add failing test reproducing groupby-resample KeyError (pandas-dev#50840) * Fix groupby-resample KeyError (pandas-dev#50840) by adding None check. * Update whatsnew for pandas-dev#50840 * Improve coverage with multi and missing column groupby-resample tests. * Refactor groupby-resample tests via TestCase to remove duplicate code. * Revert "Refactor groupby-resample tests via TestCase to remove duplicate code." This reverts commit d522606. * Fix typo in bug fix entry for pandas-dev#50840 in doc/source/whatsnew/v2.0.0.rst
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
If I try and do a
GroupBy
andResample
on a DataFrame, asking for only a subset of the columns before the aggregate, I get a KeyError.Expected Behavior
I expect to see that the following DataFrame where the aggregate has been performed on the requested column(s)
Installed Versions
INSTALLED VERSIONS
commit : 8dab54d
python : 3.9.15.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-66-generic
Version : #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.5.2
numpy : 1.24.1
pytz : 2022.7.1
dateutil : 2.8.2
setuptools : 66.0.0
pip : 22.3.1
Cython : None
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
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 10.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.0
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: