Skip to content

Commit 641eda1

Browse files
committed
fixing doctest: the order of 1,4,2 depends on hash and is not unique
1 parent 450268b commit 641eda1

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
@@ -982,9 +982,9 @@ def value_counts(
982982
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
983983
>>> index.value_counts()
984984
3.0 2
985-
1.0 1
986985
2.0 1
987986
4.0 1
987+
1.0 1
988988
dtype: int64
989989
990990
With `normalize` set to `True`, returns the relative frequency by
@@ -993,9 +993,9 @@ def value_counts(
993993
>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
994994
>>> s.value_counts(normalize=True)
995995
3.0 0.4
996-
1.0 0.2
997996
2.0 0.2
998997
4.0 0.2
998+
1.0 0.2
999999
dtype: float64
10001000
10011001
**bins**
@@ -1017,10 +1017,10 @@ def value_counts(
10171017
10181018
>>> s.value_counts(dropna=False)
10191019
3.0 2
1020-
1.0 1
10211020
2.0 1
1022-
4.0 1
10231021
NaN 1
1022+
4.0 1
1023+
1.0 1
10241024
dtype: int64
10251025
"""
10261026
result = value_counts(

0 commit comments

Comments
 (0)