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(python): add upper_bound and lower_bound methods to Series #6990

Merged
merged 3 commits into from
Feb 18, 2023

Conversation

alexander-beedie
Copy link
Collaborator

Adds the missing methods via @expr_dispatch, along with some test coverage.

Example:

pl.Series( "s", dtype=pl.UInt16 ).upper_bound()

# shape: (1,)
# Series: 's' [u16]
# [
#     65535
# ]

pl.Series( "s", dtype=pl.Int16 ).lower_bound()

# shape: (1,)
# Series: 's' [i16]
# [
#     -32768
# ]

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Feb 18, 2023
@ritchie46
Copy link
Member

Nice! And the kryptonite? ;)

@alexander-beedie
Copy link
Collaborator Author

Nice! And the kryptonite? ;)

You would not believe the sound my facepalm just made; I think there was an echo...😅

@ritchie46 ritchie46 merged commit 8abf200 into pola-rs:master Feb 18, 2023
@alexander-beedie alexander-beedie deleted the upper-lower-bounds branch February 18, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants