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

Groupby missing tuple doesn't throw #18798

Closed
TomAugspurger opened this Issue Dec 15, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@TomAugspurger
Copy link
Contributor

commented Dec 15, 2017

Code Sample, a copy-pastable example if possible

import pandas as pd
df = pd.DataFrame(1, index=range(3), columns=pd.MultiIndex.from_product([[1, 2], [3,4]]))
df.groupby((7, 8)).mean()

In 0.20.3 that raised KeyError: 7

On master I get

Out[4]:
   1     2
   3  4  3  4
7  1  1  1  1
8  1  1  1  1

cc @toobaz

@toobaz

This comment has been minimized.

Copy link
Member

commented Dec 15, 2017

Yep, I hadn't tested this... fix ready, after #18731 is pushed I will open a PR.

toobaz added a commit to toobaz/pandas that referenced this issue Dec 18, 2017

toobaz added a commit to toobaz/pandas that referenced this issue Dec 19, 2017

jreback added a commit that referenced this issue Dec 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.