From 4bdd3268d548707ef17f1e331968b3935a414569 Mon Sep 17 00:00:00 2001 From: Md Javed Date: Sun, 23 Feb 2025 18:44:42 +0530 Subject: [PATCH] Update test_describe.py Added test case --- pandas/tests/frame/methods/test_describe.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/frame/methods/test_describe.py b/pandas/tests/frame/methods/test_describe.py index e9206e86b7b08..bd7c43f21c8e9 100644 --- a/pandas/tests/frame/methods/test_describe.py +++ b/pandas/tests/frame/methods/test_describe.py @@ -413,3 +413,9 @@ def test_describe_exclude_pa_dtype(self): dtype=pd.ArrowDtype(pa.float64()), ) tm.assert_frame_equal(result, expected) + + def test_describe_single_percentile(): + df = pd.DataFrame({'A': [1, 2, 3, 4, 5]}) + result = df.describe(percentiles=[0.25]) + assert 0.25 in result.index + assert 0.5 not in result.index