-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Support for specifying col names for col_space #28929
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
Hello @VijayantSoni! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
Can you add test(s) for the changed behavior |
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.
@VijayantSoni Thanks for the PR.
@@ -533,6 +533,7 @@ def __init__( | |||
frame: "DataFrame", | |||
columns: Optional[Sequence[str]] = None, | |||
col_space: Optional[Union[str, int]] = None, | |||
col_space_cols: Optional[Sequence[str]] = None, |
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 adding an additional argument, can you make the behavior similar to the formatters
argument. (and reuse code would be great). i.e. also accept a list or a dict. (or Sequence or Mapping)
if a list, the number of elements in the list should be the same as the number of columns.
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.
Hi @simonjayhawkins , Sorry I didn't get your comment. The following statement seems confusing to me.
rather than adding an additional argument, can you make the behavior similar to the formatters argument
Did you mean to NOT add the additional argument col_space_cols
and use existing formatters
argument for this change or add an argument similar to formatters
, which accepts a list or a dict.
Also,
if a list, the number of elements in the list should be the same as the number of columns
Not sure if I understand this, if we want to change width of only a single column, we can pass only that column's name in the list, right ?
Please let me know if I missing something here.
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.
Hi @simonjayhawkins , did you get a chance to look at the my concern ? I think I need to make the new argument similar to the formatters
argument, but would still wait for your confirmation/opinion. Thanks!
@VijayantSoni are you still working on this? Agreed with @simonjayhawkins this shouldn't be a new keyword. You can model |
@WillAyd yeah, will work on changes. |
@WillAyd @simonjayhawkins Hey guys, just to update, I won't be able to work on this for another 25-20 days. Please feel free to take it up. If this is still open after that time, I will continue. |
@VijayantSoni Thanks for looking into this. I'll close for now to clear the queue. can always re-open. ping when you wish to continue. |
TO UPDATE FOLLOWING THINGS
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff