Skip to content

Commit 1bf9706

Browse files
weikhorweikhor
weikhor
authored and
weikhor
committed
resolve conversation
1 parent 5d26773 commit 1bf9706

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

doc/source/whatsnew/v2.2.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Bug fixes
3333

3434
Other
3535
~~~~~
36-
- :meth:`DataFrame.cum*` methods now have a ``numeric_only`` parameter (:issue:`53072`)
36+
-
3737

3838
.. ---------------------------------------------------------------------------
3939
.. _whatsnew_222.contributors:

doc/source/whatsnew/v3.0.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Other enhancements
3535
- Support passing a :class:`Series` input to :func:`json_normalize` that retains the :class:`Series` :class:`Index` (:issue:`51452`)
3636
- Users can globally disable any ``PerformanceWarning`` by setting the option ``mode.performance_warnings`` to ``False`` (:issue:`56920`)
3737
- :meth:`Styler.format_index_names` can now be used to format the index and column names (:issue:`48936` and :issue:`47489`)
38-
-
38+
- :meth:`DataFrame.cum*` methods now have a ``numeric_only`` parameter (:issue:`53072`)
3939

4040
.. ---------------------------------------------------------------------------
4141
.. _whatsnew_300.notable_bug_fixes:

pandas/tests/frame/test_cumulative.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def test_cumsum_preserve_dtypes(self):
8585
tm.assert_frame_equal(result, expected)
8686

8787
@pytest.mark.parametrize("method", ["cumsum", "cumprod", "cummin", "cummax"])
88-
def test_numeric_only_flag(self, method):
88+
@pytest.mark.parametrize("axis", [0, 1])
89+
def test_numeric_only_flag(self, method, axis):
90+
print(method, axis)
8991
df = DataFrame(
9092
{
9193
"int": [1, 2, 3],
@@ -99,7 +101,7 @@ def test_numeric_only_flag(self, method):
99101
],
100102
}
101103
)
102-
df_numeric_only = df.drop(["string", "datetime"], axis=1)
104+
df_numeric_only = df.drop(["string", "datetime"], axis=axis)
103105

104106
for axis in [0, 1]:
105107
result = getattr(df, method)(axis=axis, numeric_only=True)

0 commit comments

Comments
 (0)