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

depr(python, rust!): Rename str.concat to str.join and update default delimiter #16790

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Jun 6, 2024

This brings the method in line with list.join and arr.join, and Python's join method on strings.

Changes

  • Deprecate Expr/Series method str.concat. Users should use str.join instead.

Example

Before

>>> s = pl.Series(["a", "b", "c"])
>>> s.str.concat()
shape: (1,)
Series: '' [str]
[
        "a-b-c"
]

After

>>> s.str.join()
shape: (1,)
Series: '' [str]
[
        "abc"
]

@github-actions github-actions bot added breaking rust Change that breaks backwards compatibility for the Rust crate deprecation Add a deprecation warning to outdated functionality python Related to Python Polars rust Related to Rust Polars labels Jun 6, 2024
Copy link

codspeed-hq bot commented Jun 6, 2024

CodSpeed Performance Report

Merging #16790 will degrade performances by 17.2%

Comparing depr-str-concat (8204fb2) with main (1fbfa08)

Summary

❌ 1 regressions
✅ 36 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main depr-str-concat Change
test_groupby_h2oai_q5 1.8 ms 2.1 ms -17.2%

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.34%. Comparing base (cee0e53) to head (8204fb2).
Report is 1 commits behind head on main.

Files Patch % Lines
py-polars/polars/expr/string.py 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16790      +/-   ##
==========================================
+ Coverage   81.32%   81.34%   +0.01%     
==========================================
  Files        1424     1424              
  Lines      187169   187173       +4     
  Branches     2698     2699       +1     
==========================================
+ Hits       152221   152253      +32     
+ Misses      34452    34423      -29     
- Partials      496      497       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stinodego stinodego marked this pull request as ready for review June 6, 2024 17:34
@stinodego stinodego merged commit fd4c71e into main Jun 6, 2024
30 checks passed
@stinodego stinodego deleted the depr-str-concat branch June 6, 2024 20:05
@c-peters c-peters added the accepted Ready for implementation label Jun 9, 2024
@stinodego stinodego changed the title depr(python, rust!): Rename str.concat to str.join depr(python, rust!): Rename str.concat to str.join and update default delimiter Jun 12, 2024
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation breaking rust Change that breaks backwards compatibility for the Rust crate deprecation Add a deprecation warning to outdated functionality python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants