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!: Update clip to no longer propagate nulls in the given bounds #14413

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Feb 11, 2024

Closes #13714

Changes

  • Null values in the bounds no longer set the value to null - instead, the original value is retained.

Before

>>> df = pl.DataFrame({"a": [0, 1, 2], "min": [1, None, 1]})
>>> df.select(pl.col("a").clip("min"))
shape: (3, 1)
┌──────┐
│ a    │
│ ---  │
│ i64  │
╞══════╡
│ 1    │
│ null │
│ 2    │
└──────┘

After

>>> df.select(pl.col("a").clip("min"))
shape: (3, 1)
┌──────┐
│ a    │
│ ---  │
│ i64  │
╞══════╡
│ 1    │
│ 1    │
│ 2    │
└──────┘

@github-actions github-actions bot added breaking Change that breaks backwards compatibility fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Feb 11, 2024
@stinodego stinodego added this to the 1.0.0 milestone Feb 11, 2024
@stinodego stinodego marked this pull request as ready for review February 11, 2024 00:30
@stinodego stinodego removed the fix Bug fix label Feb 11, 2024
@stinodego stinodego changed the title fix!: Do not propagate nulls in clip feat!: Do not propagate nulls in clip Feb 11, 2024
@github-actions github-actions bot added the enhancement New feature or an improvement of an existing feature label Feb 11, 2024
@stinodego stinodego changed the title feat!: Do not propagate nulls in clip feat!: Do not propagate nulls in clip Feb 11, 2024
@stinodego stinodego changed the title feat!: Do not propagate nulls in clip feat!: Do not propagate nulls in clip bounds Feb 11, 2024
@stinodego stinodego removed this from the 1.0.0 milestone May 23, 2024
@stinodego stinodego requested a review from reswqa as a code owner June 4, 2024 08:13
@stinodego stinodego merged commit 3c9f984 into main Jun 4, 2024
25 checks passed
@stinodego stinodego deleted the clip-ignore-null-bounds branch June 4, 2024 08:46
@stinodego stinodego changed the title feat!: Do not propagate nulls in clip bounds feat!: Update clip to no longer propagate nulls in the given bounds 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
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.

Do not propagate nulls in clip bounds
1 participant