-
Notifications
You must be signed in to change notification settings - Fork 2.5k
docs: Explain aggregation & sorting of lists #25260
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
Open
cr7pt0gr4ph7
wants to merge
22
commits into
pola-rs:main
Choose a base branch
from
cr7pt0gr4ph7:docs/list-aggregation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+135
−2
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a90ba5d
Add list aggregation examples in lists.py
cr7pt0gr4ph7 0ac185b
docs: Explain list aggregation & sorting
cr7pt0gr4ph7 ba292a8
fix: Fix syntax error in docs
cr7pt0gr4ph7 3cb6d84
fix: Make the code formatter happy
cr7pt0gr4ph7 e541911
Fix formatting in lists-and-arrays.md
cr7pt0gr4ph7 71fd867
Update lists-and-arrays.md
cr7pt0gr4ph7 a72c0f8
Update aggregation examples to use struct fields
cr7pt0gr4ph7 413335b
fix: Make the code formatter happy
cr7pt0gr4ph7 88a48c8
Reference related API functions
cr7pt0gr4ph7 a9c9254
Fix formatting in lists-and-arrays.md
cr7pt0gr4ph7 0e5f410
Rename section markers in lists.py
cr7pt0gr4ph7 fcc0c18
Rename section markers in lists.py
cr7pt0gr4ph7 4524d28
Update lists-and-arrays.md
cr7pt0gr4ph7 cc15c1c
fix: Use correct code snippet section names
cr7pt0gr4ph7 fc49453
Update comments for struct list example section
cr7pt0gr4ph7 3157f86
fix: Add stub sections to the Rust example files
cr7pt0gr4ph7 d739879
fix: Remove trailing spaces
cr7pt0gr4ph7 b7c114b
Add markers for list-sorting section in lists.rs
cr7pt0gr4ph7 a999ed9
Add list-sorting section
cr7pt0gr4ph7 65190fd
Update lists.py
cr7pt0gr4ph7 4fdbc01
Clarify usage of eval and agg functions
cr7pt0gr4ph7 729803e
fix: Make the code formatter happy
cr7pt0gr4ph7 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
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
Oops, something went wrong.
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.
If possible, this should reference
list.aggas that makes more sense for aggregations.Uh oh!
There was an error while loading. Please reload this page.
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.
Good point, I didn't even know about
list.agg. OTOH, what's even the point of having bothlist.aggandlist.evalif the latter can do everything the former can? Dataframes also only haveDataFrame.select, which is used for both use cases.I'm mainly asking so I can explain the differences (if any) here.
Update: I've created a separate issue for this discussion:
list.evalandlist.agg#25336There 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.
@coastalwhite Thanks for the suggestion (and the clarification in #25336). I've now modified the explanation by first showing the result of using
evalfor aggregations, and then showing why it makes sense to useagginstead in those cases.I've incorporated a slightly modified version of your statement from #25336, and hope that's okay for you: