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

In expr.str.slice() indicate whether an index of 0 or 1 means "start at the start of the string" #16413

Open
DeflateAwning opened this issue May 22, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@DeflateAwning
Copy link
Contributor

Description

I always have trouble figuring out how to use slice as I mentally switch between Rust, Python, Ruby, C, and others, each with their own indexing systems.

Perhaps adding a column example which slices .str.slice(1, 3) to the example with "payaya" would be helpful.

Idea: name the columns literally ".str.slice(1, 3)", ".str.slice(4, 3)" for clarity.

Link

https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.str.slice.html#polars.Expr.str.slice

@DeflateAwning DeflateAwning added the documentation Improvements or additions to documentation label May 22, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant