Skip to content

Commit

Permalink
Update describe.py
Browse files Browse the repository at this point in the history
fix-60550
  • Loading branch information
Abhibhav2003 authored Mar 1, 2025
1 parent 3d1a0b8 commit 92972e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pandas/core/methods/describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,8 @@ def _refine_percentiles(
# get them all to be in [0, 1]
validate_percentile(percentiles)

# median should always be included
if 0.5 not in percentiles:
percentiles.append(0.5)
if percentiles == []:
percentiles.append(0.5) # By default if percentiles is empty then append 50th percentile.

percentiles = np.asarray(percentiles)

Expand Down

0 comments on commit 92972e6

Please sign in to comment.