-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: Update pivot docstring for clarity #18000
Conversation
py-polars/polars/dataframe/frame.py
Outdated
One or multiple keys to group by. If None, all remaining columns not specified | ||
on `on` and `values` will be used. At least one of `index` and `values` must | ||
be specified. | ||
One or multiple columns to group by. These are the columns which will remain from the input |
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.
How about "The unique combinations of values from the index
columns form the output rows"?
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 adapted from your suggestion but didn't take it exactly. I don't like saying it "form"s the output rows because it takes both the index and the values to form the output rows so I don't know if that might be confusing for someone. I did incorporate the unique combination making up the rows though.
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.
Yeah I agree with that, thanks! Pivot explanations are so darn hard to word...
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18000 +/- ##
==========================================
+ Coverage 80.48% 80.52% +0.03%
==========================================
Files 1496 1496
Lines 196646 196728 +82
Branches 2817 2817
==========================================
+ Hits 158274 158411 +137
+ Misses 37851 37796 -55
Partials 521 521 ☔ View full report in Codecov by Sentry. |
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.
Thanks!
addresses #17967