We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee5ff56 commit bf704acCopy full SHA for bf704ac
pandas/io/formats/format.py
@@ -1576,11 +1576,12 @@ def format_percentiles(
1576
):
1577
raise ValueError("percentiles should all be in the interval [0,1]")
1578
1579
- # Fix for issue #60550
1580
if len(percentiles) > 0 :
+
1581
percentiles = 100 * percentiles
1582
1583
else :
1584
1585
percentiles = np.array([])
1586
1587
prec = get_precision(percentiles)
@@ -1602,8 +1603,9 @@ def format_percentiles(
1602
1603
1604
1605
def get_precision(array: np.ndarray | Sequence[float]) -> int:
1606
- if array.size == 0:
1607
+ if len(array) == 0:
1608
1609
return 0
1610
1611
to_begin = array[0] if array[0] > 0 else None
0 commit comments