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

feat: add str.replace and str.replace_all #750

Merged
merged 16 commits into from
Aug 12, 2024

Conversation

lucianosrp
Copy link
Member

@lucianosrp lucianosrp commented Aug 8, 2024

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below.

In polars, Expr.replace and Expr.replace_all also accept and Expr for the pattern and value arguments.
But this seems only to be true when using pl.lit as arguments.
I just implemented the type str for this PR.

@github-actions github-actions bot added the enhancement New feature or request label Aug 8, 2024
@lucianosrp lucianosrp changed the title feat: add first str.replace and str.replace_all feat: add str.replace and str.replace_all Aug 8, 2024
narwhals/_dask/expr.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
@lucianosrp lucianosrp marked this pull request as ready for review August 11, 2024 08:11
@lucianosrp lucianosrp requested a review from FBruzzesi August 11, 2024 10:06
Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

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

One final concern to address πŸ˜‡

narwhals/_dask/expr.py Outdated Show resolved Hide resolved
narwhals/_dask/expr.py Outdated Show resolved Hide resolved
lucianosrp and others added 2 commits August 11, 2024 12:29
Co-authored-by: Francesco Bruzzesi <[email protected]>
Co-authored-by: Francesco Bruzzesi <[email protected]>
Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

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

Thanks for all the quick adjustments πŸ‘Œ

HiThereGIF

@MarcoGorelli
Copy link
Member

nice one! this is probably fine (i'll do another check in the morning, then will merge)

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @lucianosrp , and thanks @FBruzzesi for reviewing!

@MarcoGorelli MarcoGorelli merged commit 946db09 into narwhals-dev:main Aug 12, 2024
20 checks passed
@lucianosrp
Copy link
Member Author

aah more gifs ! 🀣
Thanks @FBruzzesi for the attentive review and comments πŸ™

@lucianosrp lucianosrp deleted the feat/str-replace branch August 12, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants