Skip to content

Commit 0b5a7c7

Browse files
committed
fixing doctest: the order of 1,4,2 depends on hash and is not unique
1 parent 948d958 commit 0b5a7c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1189,9 +1189,9 @@ def value_counts(
11891189
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
11901190
>>> index.value_counts()
11911191
3.0 2
1192+
1.0 1
11921193
4.0 1
11931194
2.0 1
1194-
1.0 1
11951195
dtype: int64
11961196
11971197
With `normalize` set to `True`, returns the relative frequency by
@@ -1200,9 +1200,9 @@ def value_counts(
12001200
>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
12011201
>>> s.value_counts(normalize=True)
12021202
3.0 0.4
1203+
1.0 0.2
12031204
4.0 0.2
12041205
2.0 0.2
1205-
1.0 0.2
12061206
dtype: float64
12071207
12081208
**bins**

0 commit comments

Comments
 (0)