Skip to content

Commit bf1effa

Browse files
committed
Minor fixes
1 parent a0a0c63 commit bf1effa

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

pandas/core/generic.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -10818,12 +10818,8 @@ def describe(
1081810818
----------
1081910819
percentiles : list-like of numbers, optional
1082010820
The percentiles to include in the output. All should
10821-
fall between 0 and 1. Here are the options:
10822-
10823-
- A list-like of numbers : To include the percentiles listed. If
10824-
that list is empty, no percentiles will be returned.
10825-
- None (default) : To include the default percentiles, which are the
10826-
25th, 50th, and 75th ones.
10821+
fall between 0 and 1. The default, ``None``, will automatically
10822+
return the 25th, 50th, and 75th percentiles.
1082710823
include : 'all', list-like of dtypes or None (default), optional
1082810824
A white list of data types to include in the result. Ignored
1082910825
for ``Series``. Here are the options:

pandas/tests/frame/methods/test_describe.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def test_refine_percentiles(self, percentiles):
431431
if percentiles is None:
432432
percentiles = [0.25, 0.5, 0.75]
433433

434-
expected = Series(
434+
expected = DataFrame(
435435
{
436436
"count": len(df.a),
437437
"mean": df.a.mean(),
@@ -440,6 +440,7 @@ def test_refine_percentiles(self, percentiles):
440440
**{f"{p:.0%}": df.a.quantile(p) for p in percentiles},
441441
"max": df.a.max(),
442442
},
443-
).to_frame(name="a")
443+
index=["a"],
444+
).T
444445

445446
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)