Skip to content

Commit 8315e85

Browse files
committed
doctest issues
1 parent 3f37b7d commit 8315e85

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/generic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10485,7 +10485,7 @@ def _doc_parms(cls):
1048510485
True
1048610486
>>> pd.Series([True, False]).all()
1048710487
False
10488-
>>> pd.Series([]).all()
10488+
>>> pd.Series([], dtype=object).all()
1048910489
True
1049010490
>>> pd.Series([np.nan]).all()
1049110491
True
@@ -10853,7 +10853,7 @@ def _doc_parms(cls):
1085310853
False
1085410854
>>> pd.Series([True, False]).any()
1085510855
True
10856-
>>> pd.Series([]).any()
10856+
>>> pd.Series([], dtype=object).any()
1085710857
False
1085810858
>>> pd.Series([np.nan]).any()
1085910859
False
@@ -10955,13 +10955,13 @@ def _doc_parms(cls):
1095510955
1095610956
By default, the sum of an empty or all-NA Series is ``0``.
1095710957
10958-
>>> pd.Series([]).sum() # min_count=0 is the default
10958+
>>> pd.Series([], dtype=float).sum() # min_count=0 is the default
1095910959
0.0
1096010960
1096110961
This can be controlled with the ``min_count`` parameter. For example, if
1096210962
you'd like the sum of an empty series to be NaN, pass ``min_count=1``.
1096310963
10964-
>>> pd.Series([]).sum(min_count=1)
10964+
>>> pd.Series([], dtype=float).sum(min_count=1)
1096510965
nan
1096610966
1096710967
Thanks to the ``skipna`` parameter, ``min_count`` handles all-NA and
@@ -11002,12 +11002,12 @@ def _doc_parms(cls):
1100211002
--------
1100311003
By default, the product of an empty or all-NA Series is ``1``
1100411004
11005-
>>> pd.Series([]).prod()
11005+
>>> pd.Series([], dtype=float).prod()
1100611006
1.0
1100711007
1100811008
This can be controlled with the ``min_count`` parameter
1100911009
11010-
>>> pd.Series([]).prod(min_count=1)
11010+
>>> pd.Series([], dtype=float).prod(min_count=1)
1101111011
nan
1101211012
1101311013
Thanks to the ``skipna`` parameter, ``min_count`` handles all-NA and

0 commit comments

Comments
 (0)