From d00a50c42c3ff2aa48508062b44193b2d44c2c65 Mon Sep 17 00:00:00 2001 From: Deepith N <135017639+deepith-18@users.noreply.github.com> Date: Mon, 15 Sep 2025 22:31:24 +0530 Subject: [PATCH 1/2] DOC: Add missing periods in DataFrame docstrings --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 473f69591aa70..bd7b7789cc0b6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -11764,7 +11764,7 @@ def count(self, axis: Axis = 0, numeric_only: bool = False) -> Series: axis : {0 or 'index', 1 or 'columns'}, default 0 If 0 or 'index' counts are generated for each column. If 1 or 'columns' counts are generated for each row. - numeric_only : bool, default False + numeric_only : bool, default False. Include only `float`, `int` or `boolean` data. Returns From 59712b5c5d77eaa2f3fb178bb6af24305231372b Mon Sep 17 00:00:00 2001 From: Deepith N <135017639+deepith-18@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:21:49 +0530 Subject: [PATCH 2/2] TEST: Add test for select_dtypes on an empty DataFrame --- pandas/tests/frame/methods/test_select_dtypes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandas/tests/frame/methods/test_select_dtypes.py b/pandas/tests/frame/methods/test_select_dtypes.py index 0354e9df3d168..d18f45ef63dcd 100644 --- a/pandas/tests/frame/methods/test_select_dtypes.py +++ b/pandas/tests/frame/methods/test_select_dtypes.py @@ -483,3 +483,10 @@ def test_select_dtypes_no_view(self): result = df.select_dtypes(include=["number"]) result.iloc[0, 0] = 0 tm.assert_frame_equal(df, df_orig) + + def test_select_dtypes_empty_frame(): + # Test that select_dtypes works on a completely empty DataFrame + df = DataFrame() + result = df.select_dtypes(include="int64") + expected = DataFrame() + tm.assert_frame_equal(result, expected)