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 check_names parameter to Series.equals and default to False #16610

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented May 30, 2024

Closes #13231

Changes

  • Add a check_names parameter to Series.equals on the Python side. This parameter defaults to False - which is a breaking change for Python users.
  • On the Rust side, Series.equals no longer checks the data types by default
  • On the Rust side, Series.equals_missing and equals no longer check names by default.

Example

Before:

>>> s1 = pl.Series("foo", [1, 2, 3])
>>> s2 = pl.Series("bar", [1, 2, 3])
>>> s1.equals(s2)
False

After:

>>> s1.equals(s2)
True
>>> s1.equals(s2, check_names=True)
False

@github-actions github-actions bot added breaking Change that breaks backwards compatibility enhancement New feature or an improvement of an existing feature python Related to Python Polars labels May 30, 2024
@stinodego stinodego changed the title feat(python)!: Add check_names parameter to Series.equals and default to False feat!: Add check_names parameter to Series.equals and default to False May 30, 2024
@github-actions github-actions bot added the rust Related to Rust Polars label May 30, 2024
@stinodego stinodego marked this pull request as ready for review May 30, 2024 22:21
Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.51%. Comparing base (d7b4f72) to head (2ca5a91).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-core/src/testing.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16610   +/-   ##
=======================================
  Coverage   81.51%   81.51%           
=======================================
  Files        1414     1414           
  Lines      185906   185914    +8     
  Branches     3027     3027           
=======================================
+ Hits       151535   151549   +14     
+ Misses      33840    33834    -6     
  Partials      531      531           

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

@stinodego stinodego force-pushed the breaking-equals-check-names branch from d4420be to 2ca5a91 Compare May 31, 2024 08:33
Copy link

codspeed-hq bot commented May 31, 2024

CodSpeed Performance Report

Merging #16610 will improve performances by 15.15%

Comparing breaking-equals-check-names (2ca5a91) with main (bfcc1ee)

Summary

⚡ 1 improvements
✅ 36 untouched benchmarks

Benchmarks breakdown

Benchmark main breaking-equals-check-names Change
test_groupby_h2oai_q1 2.3 ms 2 ms +15.15%

@ritchie46 ritchie46 merged commit 9ea3bb6 into main Jun 4, 2024
27 checks passed
@ritchie46 ritchie46 deleted the breaking-equals-check-names branch June 4, 2024 06:18
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
breaking Change that breaks backwards compatibility enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Series.equals to ignore name by default
2 participants