-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: get_group fails when multi-grouping with a categorical #10132
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
Conversation
can you put the self-contained example in the top of the PR? |
if len(self.groupings) == 1: | ||
return self.groupings[0].indices | ||
else: | ||
label_list = [ping.labels for ping in self.groupings] | ||
keys = [_values_from_object(ping.group_index) for ping in self.groupings] | ||
keys = [extract_values(ping.group_index) for ping in self.groupings] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this, i think that .get_values()
needs to be defined for CategoricalIndex
(.get_values
is defined for a regular index and CategoricalIndex
is just inhertiting).
can you update according to comments |
Done, and moved to 0.16.2 whatsnew. Does this need an entry in the API changes section now, or is this change too minor? |
@@ -66,7 +66,9 @@ Bug Fixes | |||
- Bug in getting timezone data with ``dateutil`` on various platforms ( :issue:`9059`, :issue:`8639`, :issue:`9663`, :issue:`10121`) | |||
- Bug in display datetimes with mixed frequencies uniformly; display 'ms' datetimes to the proper precision. (:issue:`10170`) | |||
|
|||
- Bung in ``Series`` arithmetic methods may incorrectly hold names (:issue:`10068`) | |||
- Bun in ``Series`` arithmetic methods may incorrectly hold names (:issue:`10068`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you removed the wrong character :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incremental progress :)
This seems a bug fix to me, so the whatsnew entry is fine! |
yep, pls squash. ping when green. |
Tests are green |
@evanpw thanks. Soon, waiting on travis to finish up its builds of a bunch of stuff. |
BUG: get_group fails when multi-grouping with a categorical
@evanpw thanks! |
Example:
The problem is that
Grouping.group_index
is a CategoricalIndex, so callingget_values()
gives you aCategorical
, which needs one more application ofget_values()
to get anndarray