@@ -12532,13 +12532,53 @@ def last_valid_index(self) -> Hashable | None:
12532
12532
{examples}
12533
12533
"""
12534
12534
12535
+ _sum_prod_doc = """
12536
+ {desc}
12537
+
12538
+ Parameters
12539
+ ----------
12540
+ axis : {axis_descr}
12541
+ Axis for the function to be applied on.
12542
+ For `Series` this parameter is unused and defaults to 0.
12543
+
12544
+ .. warning::
12545
+
12546
+ The behavior of DataFrame.{name} with ``axis=None`` is deprecated,
12547
+ in a future version this will reduce over both axes and return a scalar
12548
+ To retain the old behavior, pass axis=0 (or do not pass axis).
12549
+
12550
+ .. versionadded:: 2.0.0
12551
+
12552
+ skipna : bool, default True
12553
+ Exclude NA/null values when computing the result.
12554
+ numeric_only : bool, default False
12555
+ Include only float, int, boolean columns. Not implemented for Series.
12556
+
12557
+ {min_count}\
12558
+ **kwargs
12559
+ Additional keyword arguments to be passed to the function.
12560
+
12561
+ Returns
12562
+ -------
12563
+ {name1} or scalar\
12564
+ {see_also}\
12565
+ {examples}
12566
+ """
12567
+
12535
12568
_num_ddof_doc = """
12536
12569
{desc}
12537
12570
12538
12571
Parameters
12539
12572
----------
12540
12573
axis : {axis_descr}
12541
12574
For `Series` this parameter is unused and defaults to 0.
12575
+
12576
+ .. warning::
12577
+
12578
+ The behavior of DataFrame.{name} with ``axis=None`` is deprecated,
12579
+ in a future version this will reduce over both axes and return a scalar
12580
+ To retain the old behavior, pass axis=0 (or do not pass axis).
12581
+
12542
12582
skipna : bool, default True
12543
12583
Exclude NA/null values. If an entire row/column is NA, the result
12544
12584
will be NA.
@@ -13246,7 +13286,7 @@ def make_doc(name: str, ndim: int) -> str:
13246
13286
kwargs = {"min_count" : "" }
13247
13287
13248
13288
elif name == "sum" :
13249
- base_doc = _num_doc
13289
+ base_doc = _sum_prod_doc
13250
13290
desc = (
13251
13291
"Return the sum of the values over the requested axis.\n \n "
13252
13292
"This is equivalent to the method ``numpy.sum``."
@@ -13256,7 +13296,7 @@ def make_doc(name: str, ndim: int) -> str:
13256
13296
kwargs = {"min_count" : _min_count_stub }
13257
13297
13258
13298
elif name == "prod" :
13259
- base_doc = _num_doc
13299
+ base_doc = _sum_prod_doc
13260
13300
desc = "Return the product of the values over the requested axis."
13261
13301
see_also = _stat_func_see_also
13262
13302
examples = _prod_examples
@@ -13540,6 +13580,7 @@ def make_doc(name: str, ndim: int) -> str:
13540
13580
13541
13581
docstr = base_doc .format (
13542
13582
desc = desc ,
13583
+ name = name ,
13543
13584
name1 = name1 ,
13544
13585
name2 = name2 ,
13545
13586
axis_descr = axis_descr ,
0 commit comments