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(python): Use .with_columns() in all .list namespace examples #12475

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

cmdlineluser
Copy link
Contributor

Not sure if I need to make an issue for this first:

I noticed .select() was used when checking the docs for .list.join so I thought I'd update all the examples.

A couple of other changes:

  • replaced all .alias() calls with named expressions
  • a few examples used pl.Series so I changed them to pl.DataFrame
  • .list.take() had no example, so I added one
  • I added some max_width examples/notes to .list.to_struct()

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars labels Nov 15, 2023
@alexander-beedie
Copy link
Collaborator

alexander-beedie commented Nov 15, 2023

I think this is a great improvement! Increasing the use of with_columns in the examples really helps to make it clear exactly what is happening... Gets my vote (with just one minor update) 😎👍

py-polars/polars/expr/list.py Outdated Show resolved Hide resolved
@alexander-beedie alexander-beedie merged commit d5a1801 into pola-rs:main Nov 15, 2023
12 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants