We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
describe
Data often contains columns with flags (yes/no, true/false).
Getting a quick overview of the column requires actually only 2 things
This can be easily solved by adding the "mean" value of the boolean column
[True, False, False, None]
[True, True, True, None]
[False, False, False, None]
[None, None, None, None]
Problem: almost useless for bool columns. Only information is the null_count
pl.DataFrame({"bool": [True, False, False, None]}).describe() shape: (9, 2) ┌────────────┬───────┐ │ describe ┆ bool │ │ --- ┆ --- │ │ str ┆ str │ ╞════════════╪═══════╡ │ count ┆ 3 │ │ null_count ┆ 1 │ │ mean ┆ null │ <<<<< this would be really usefull to get the Yes/No-Ratio │ std ┆ null │ │ min ┆ False │ │ 25% ┆ null │ │ 50% ┆ null │ │ 75% ┆ null │ │ max ┆ True │ └────────────┴───────┘
The text was updated successfully, but these errors were encountered:
I'm sold; it seems genuinely useful as an indicator.
Sorry, something went wrong.
Happy to take this one
mean
bool
DataFrame.Describe
Series.Describe
Successfully merging a pull request may close this issue.
Description
Data often contains columns with flags (yes/no, true/false).
Getting a quick overview of the column requires actually only 2 things
This can be easily solved by adding the "mean" value of the boolean column
[True, False, False, None]
-> 0.33 (33% True)[True, True, True, None]
-> 1.00 (100% True)[False, False, False, None]
-> 0.0 (0% True)[None, None, None, None]
-> 0.0 (0% True)Current State:
Problem: almost useless for bool columns. Only information is the null_count
The text was updated successfully, but these errors were encountered: