-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Truncate columns list to match tr_frame for correct dict formatters lookup #35907
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
21 commits Select commit Hold shift + click to select a range
09feb7d Truncade columns list to match truncated frame for correct dict forma…
73b6def Make fix for truncated columns more localized
995c371 Simplify truncated column lookup
f789b79 Add what's new entry
c5dcb26 Make inputs parameterized
f4dfd76 Merge branch 'master' into fix/trunc-formatters
1c1f5e5 Fix pep8 formatting issues
38fbb57 Fix pep8 formatting issues
c280201 Add attribute definition for truncated frame
d376644 Change list comprehension to dict comprehension
5f00d52 Parameterize formatters
aa1f500 Merge branch 'master' into fix/trunc-formatters
c7be576 Fix list formatting
73be8db Fix list formatting
985e159 Sync with master
c887a1c Merge branch 'pandas-dev-master' into fix/trunc-formatters
83a9746 Remove self
d18e7bd Merge branch 'master' into fix/trunc-formatters
2a1ced8 Merge branch 'master' into fix/trunc-formatters
8320bfd Changed dict(...) to {...}
68ac363 Fix dict syntax
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
Next Next commit
Truncade columns list to match truncated frame for correct dict forma…
…tters lookup
- Loading branch information
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.
Rather than this can you just parametrize the inputs?
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'm not sure what you mean.
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.
Check out the
pytest.mark.parametrizedecorator - it is used by a few other tests in this module alreadyThere 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 haven't used that before, but I'm still not sure what you had in mind to parameterize this method.
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 added parameterized inputs. I'm not sure if this is quite what you were expecting since there was only one pair of inputs / outputs used in the test.
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 would argue that the original version (without parametrize) was more readable. Maybe @WillAyd suggested that you parameterize separately formatters for float, int and object?
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.
That wouldn't exercise the fix though. It needs all of the columns in one DataFrame so that a truncated string representation can be displayed.
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.
The suggestion was to parametrize the arguments to
formatters; one parametrize for the dict input and one for the list