-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Add HTML repr for groupby dataframe and series #34926
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
Closed
Changes from 1 commit
Commits
Show all changes
35 commits Select commit Hold shift + click to select a range
5e1cb8c Add html repr for groupby dataframe and series
JulianWgs 9c3df8a Sort imports with isort in groupby.py
JulianWgs 4a3911a Improve variable naming
JulianWgs 46f5353 Add display.max_groups to config
JulianWgs c840c29 Add group display truncation for too many groups
JulianWgs 139bdc6 Implement faster and more scalable list variant
JulianWgs 1020be9 Black config_init
JulianWgs 2e4a6ee Fix bug which displayed too few rows
JulianWgs ea2f151 Add test for groupby representation
JulianWgs 2443b80 Delete trailing whitespace in comment
JulianWgs 913afb0 Add test cases for truncated rows and groups
JulianWgs 7efc505 Merge remote-tracking branch 'upstream/master'
JulianWgs d85fc63 Skip test if lxml is not installed
JulianWgs 778d90d Move html repr function to io/formats/format.py
JulianWgs 9736007 Add doc string and return type annotation
JulianWgs 7f1937c Add type annotations for input arg
JulianWgs 388f35d Fix linting errors
JulianWgs 228e659 Move import to the correct location
JulianWgs dee1220 Remove pandas type annotations
JulianWgs 57b8bf3 Merge remote-tracking branch 'upstream/master'
JulianWgs 2c5c394 Remove inconsistent use of pd namespace in tests
JulianWgs 669c047 Fix typo and capitalize pandas objs correctly
JulianWgs 8a75299 Change docstring to comment in groupby repr test
JulianWgs b36177d Add additional explanation in groupby_repr test
JulianWgs edff21d Test more rows in groupby repr when truncated
JulianWgs 580d09b Test more groups in groupby repr when truncated
JulianWgs 0c948e1 Refactor groups repr html
JulianWgs e41ff00 Merge remote-tracking branch 'upstream/master'
JulianWgs ae8721d Add whatsnew entry for group-by HTML representation
JulianWgs 1c92ed8 Fix test case name
JulianWgs b92d61f Rename groupby objects
JulianWgs 579998a Add case for single and tuple groupby key
JulianWgs 8d8b260 Merge remote-tracking branch 'upstream/master'
JulianWgs 5865cfb Merge branch 'master' into master
JulianWgs 7a11be8 Move whats new to 1.4.0 release
JulianWgs 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
Move html repr function to io/formats/format.py
- from groupby module - #34926 (comment)
- Loading branch information
commit 778d90d0ef0179bfa88f236ccdef95843f25e14e
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
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.
I'd like to reorg this to use a GroupbyFormatter located in pandas/io/formats/groupby.py (it can do pretty much this but just locate the code there) as this is where we keep all of the formatting code.
could also add a
.to_string()method but not sure that's actually worth it (maybe open an issue for that).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.
Thank for the review! Do you mean pandas/io/formats/html.py? Should I add a new function and then just call that function from the above location?
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.
no, i mean pandas/io/formats/format.py (ok to just shove in there is fine, we should split that file up but that's for later).