Skip to content

BUG in .groupby for single-row DF #12063

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

Closed
wants to merge 1 commit into from
Closed

BUG in .groupby for single-row DF #12063

wants to merge 1 commit into from

Conversation

nbonnotte
Copy link
Contributor

No KeyError was raised when grouping by a non-existant column

Fixes #11741

Xref issue #11640, PR #11717

@@ -3085,6 +3085,11 @@ def test_groupby_keys_same_size_as_index(self):

assert_frame_equal(result, expected)

def test_groupby_one_row(self):
# GH 11741
df = pd.DataFrame(np.random.randn(1, 4), columns=list('ABCD'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also add with (2,4) as well just for completeness

@jreback jreback added this to the 0.18.0 milestone Jan 16, 2016
No KeyError was raised when grouping by a non-existant column

Fixes #11741

Xref issue #11640, PR #11717
@jreback
Copy link
Contributor

jreback commented Jan 17, 2016

merged via e9e8598

thanks!

@jreback jreback closed this Jan 17, 2016
@nbonnotte nbonnotte deleted the groupby-no-key-error-11741 branch January 17, 2016 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants