Skip to content

Conversation

mdjaved24
Copy link

This PR fixes an issue where passing a single value to .describe(percentiles=[...]) would incorrectly include the 50th percentile (median) in the output. The fix ensures that only the explicitly requested percentiles are returned.

Changes:
Modified the .describe() method to avoid adding the 50th percentile by default when a custom percentiles list is provided.

Closes: #60550

Remove the condition where it checks if 0.5 not in the given value.
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Whenever changing behavior, please always add tests. Will also need to add a note in whatsnew for 3.0.

@mroeschke
Copy link
Member

Thanks for the PR, but #61158 has addressed and closed the original issue so closing this PR. Happy to have your contributions towards other PRs

@mroeschke mroeschke closed this Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Passing a single value to .describe(percentiles = [0.25]) returns 25th- and 50th-percentile

3 participants