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

WIP docs(python): Add expression composability to PySpark comparison #21473

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarcoGorelli
Copy link
Collaborator

@MarcoGorelli MarcoGorelli commented Feb 26, 2025

Writing Narwhals has really made me appreciate how good Polars and its API is 😄 🙌


EDIT: checking this, will update shortly

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars labels Feb 26, 2025
@MarcoGorelli MarcoGorelli marked this pull request as ready for review February 26, 2025 11:46
)
```

In PySpark however this is not allowed, as `shift`/`lag` is not a scalar (i.e. elementwise)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe spark only allows reductions (looking at the code example you provided).

Suggested change
In PySpark however this is not allowed, as `shift`/`lag` is not a scalar (i.e. elementwise)
In PySpark however this is not allowed, as `shift`/`lag` is not a scalar (i.e. reduction)


### Example 3: Composing expressions

Polars allow you compose expressions quite liberally. For example, if you want to find the rolling
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows

@MarcoGorelli MarcoGorelli marked this pull request as draft February 27, 2025 09:29
@MarcoGorelli MarcoGorelli changed the title docs(python): Add expression composability to PySpark comparison WIP docs(python): Add expression composability to PySpark comparison Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars title needs formatting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants