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

docs(python): improve n_unique and approx_n_unique docs #13752

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jan 15, 2024

Added a note about null being considered a distinct value in its own right for the purposes of n_unique, and extended the examples a little to better illustrate the functionality.

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars labels Jan 15, 2024
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Good to have this clarified! It has surprised me in the past.

EDIT: Looks the approx_n_unique outcome is not stable - might want to ignore the result of that example.

py-polars/polars/expr/expr.py Outdated Show resolved Hide resolved
@alexander-beedie
Copy link
Collaborator Author

EDIT: Looks the approx_n_unique outcome is not stable - might want to ignore the result of that example.

Done! Added a 'skip' directive 👍

@stinodego
Copy link
Member

EDIT: Looks the approx_n_unique outcome is not stable - might want to ignore the result of that example.

Done! Added a 'skip' directive 👍

Actually the doctest: +IGNORE_RESULT directive would be more fitting for this (this would run the example but not check the output), but it doesn't matter much. Merging then!

@stinodego stinodego merged commit 39d9fd6 into pola-rs:main Jan 15, 2024
11 checks passed
@alexander-beedie alexander-beedie deleted the docs_n_unique branch January 15, 2024 21:15
r-brink pushed a commit to r-brink/polars that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants