Skip to content

Commit cf501bc

Browse files
committed
doctest issues
1 parent 722512a commit cf501bc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/generic.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -10478,7 +10478,7 @@ def _doc_parms(cls):
1047810478
True
1047910479
>>> pd.Series([True, False]).all()
1048010480
False
10481-
>>> pd.Series([]).all()
10481+
>>> pd.Series([], dtype=object).all()
1048210482
True
1048310483
>>> pd.Series([np.nan]).all()
1048410484
True
@@ -10846,7 +10846,7 @@ def _doc_parms(cls):
1084610846
False
1084710847
>>> pd.Series([True, False]).any()
1084810848
True
10849-
>>> pd.Series([]).any()
10849+
>>> pd.Series([], dtype=object).any()
1085010850
False
1085110851
>>> pd.Series([np.nan]).any()
1085210852
False
@@ -10948,13 +10948,13 @@ def _doc_parms(cls):
1094810948
1094910949
By default, the sum of an empty or all-NA Series is ``0``.
1095010950
10951-
>>> pd.Series([]).sum() # min_count=0 is the default
10951+
>>> pd.Series([], dtype=float).sum() # min_count=0 is the default
1095210952
0.0
1095310953
1095410954
This can be controlled with the ``min_count`` parameter. For example, if
1095510955
you'd like the sum of an empty series to be NaN, pass ``min_count=1``.
1095610956
10957-
>>> pd.Series([]).sum(min_count=1)
10957+
>>> pd.Series([], dtype=float).sum(min_count=1)
1095810958
nan
1095910959
1096010960
Thanks to the ``skipna`` parameter, ``min_count`` handles all-NA and
@@ -10995,12 +10995,12 @@ def _doc_parms(cls):
1099510995
--------
1099610996
By default, the product of an empty or all-NA Series is ``1``
1099710997
10998-
>>> pd.Series([]).prod()
10998+
>>> pd.Series([], dtype=float).prod()
1099910999
1.0
1100011000
1100111001
This can be controlled with the ``min_count`` parameter
1100211002
11003-
>>> pd.Series([]).prod(min_count=1)
11003+
>>> pd.Series([], dtype=float).prod(min_count=1)
1100411004
nan
1100511005
1100611006
Thanks to the ``skipna`` parameter, ``min_count`` handles all-NA and

0 commit comments

Comments
 (0)