-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Feature/groupby repr ellipses 1135 #24853
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
benjaminarjun
wants to merge
24
commits into
pandas-dev:master
from
benjaminarjun:feature/groupby-repr-ellipses-1135
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f44e671
Add truncatable repr for DF groupby groups
benjaminarjun 19bb9bf
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun d6b310a
Roll back added params to __pprint_dict. All logic now in __repr__ de…
benjaminarjun 43dbc6b
Remove unused line of code
benjaminarjun 49f1def
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 85d3012
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 0746c3b
Temporarily disabling failing test
benjaminarjun 6a7d7df
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 3d4b057
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 33142cb
Move truncated dict repr to Index.groupby()
benjaminarjun dbb7d12
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 5db6c07
Add correct groups object
benjaminarjun 8f30d07
A few misc items for the linter
benjaminarjun 2870163
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun acfa005
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun b60329c
Use pprint_thing in IndexGroupByGroups. Add whatsnew, docstring, and …
benjaminarjun 13b73a6
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 29c6263
Update tests to expect pprint formatting. Use new config location. Sm…
benjaminarjun ccb98a3
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun c74cbba
Accept isort formatting preference
benjaminarjun cdb9ebc
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun 9621669
Add nonsense to AUTHORS.md
benjaminarjun 38ecd1a
Revert "Add nonsense to AUTHORS.md"
benjaminarjun 9742473
Merge branch 'master' into feature/groupby-repr-ellipses-1135
benjaminarjun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Failing on this line - I'm wondering what the value of this behavior is and/or whether there's interest in retaining it?
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.
Hmm I would think so; so the current approach is instantiating a new class on every access of
.groups
? That seems potentially expensive and counter-intuitive.Is there a way to get the intended behavior without a new class?
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.
Not that I'm aware of.
groups
is currently a standard dict, whose__repr__
isn't abbreviated, even for large instances. Seems you'd have to override the__repr__
to get this behavior, and to do that you'd have to subclassdict
. Maybe there's a better way I haven't thought of.In response to instantiating a new class on every access, I could look into storing groups on the GroupBy object as an instance of the new class rather than a plain dict. Then
.groups
would just get the attribute rather than creating a new object every time it's called. I think that would resolve this case.