Skip to content
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: Correct the definition of an expression in the user guide #14750

Merged
merged 4 commits into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/user-guide/concepts/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ Polars performs these core data transformations very quickly by:
- automatic query optimization on each expression
- automatic parallelization of expressions on many columns

Polars expressions are a mapping from a series to a series (or mathematically `Fn(Series) -> Series`). As expressions have a `Series` as an input and a `Series` as an output then it is straightforward to do a sequence of expressions (similar to method chaining in pandas).
An expression is a tree of operations that describe how to construct one or more
Series. As the outputs are Series, it is straightforward to
apply a sequence of expressions (similar to method chaining in pandas) each of which
transforms the output from the previous step.

If this seems abstract and confusing - don't worry! People quickly develop an intuition for expressions
just by looking at a few examples. We'll do that next!

## Examples

Expand Down