Skip to content

Commit 440f735

Browse files
committed
fixing doctest: the order of 1,4,2 depends on hash and is not unique
1 parent fea766a commit 440f735

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,9 @@ def value_counts(
933933
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
934934
>>> index.value_counts()
935935
3.0 2
936-
1.0 1
937936
2.0 1
938937
4.0 1
938+
1.0 1
939939
dtype: int64
940940
941941
With `normalize` set to `True`, returns the relative frequency by
@@ -944,9 +944,9 @@ def value_counts(
944944
>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
945945
>>> s.value_counts(normalize=True)
946946
3.0 0.4
947-
1.0 0.2
948947
2.0 0.2
949948
4.0 0.2
949+
1.0 0.2
950950
dtype: float64
951951
952952
**bins**
@@ -968,10 +968,10 @@ def value_counts(
968968
969969
>>> s.value_counts(dropna=False)
970970
3.0 2
971-
1.0 1
972971
2.0 1
973-
4.0 1
974972
NaN 1
973+
4.0 1
974+
1.0 1
975975
dtype: int64
976976
"""
977977
result = value_counts(

0 commit comments

Comments
 (0)