Skip to content

Commit 06a08d2

Browse files
committed
fixing doctest: the order of 1,4,2 depends on hash and is not unique
1 parent 4b3d991 commit 06a08d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -914,9 +914,9 @@ def value_counts(
914914
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
915915
>>> index.value_counts()
916916
3.0 2
917+
1.0 1
917918
4.0 1
918919
2.0 1
919-
1.0 1
920920
dtype: int64
921921
922922
With `normalize` set to `True`, returns the relative frequency by
@@ -925,9 +925,9 @@ def value_counts(
925925
>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
926926
>>> s.value_counts(normalize=True)
927927
3.0 0.4
928+
1.0 0.2
928929
4.0 0.2
929930
2.0 0.2
930-
1.0 0.2
931931
dtype: float64
932932
933933
**bins**
@@ -949,10 +949,10 @@ def value_counts(
949949
950950
>>> s.value_counts(dropna=False)
951951
3.0 2
952-
NaN 1
952+
1.0 1
953953
4.0 1
954954
2.0 1
955-
1.0 1
955+
NaN 1
956956
dtype: int64
957957
"""
958958
result = value_counts(

0 commit comments

Comments
 (0)