Skip to content

Commit a017682

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

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
@@ -1199,9 +1199,9 @@ def value_counts(
11991199
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
12001200
>>> index.value_counts()
12011201
3.0 2
1202+
1.0 1
12021203
4.0 1
12031204
2.0 1
1204-
1.0 1
12051205
dtype: int64
12061206
12071207
With `normalize` set to `True`, returns the relative frequency by
@@ -1210,9 +1210,9 @@ def value_counts(
12101210
>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
12111211
>>> s.value_counts(normalize=True)
12121212
3.0 0.4
1213+
1.0 0.2
12131214
4.0 0.2
12141215
2.0 0.2
1215-
1.0 0.2
12161216
dtype: float64
12171217
12181218
**bins**
@@ -1234,10 +1234,10 @@ def value_counts(
12341234
12351235
>>> s.value_counts(dropna=False)
12361236
3.0 2
1237-
NaN 1
1237+
1.0 1
12381238
4.0 1
12391239
2.0 1
1240-
1.0 1
1240+
NaN 1
12411241
dtype: int64
12421242
"""
12431243
result = value_counts(

0 commit comments

Comments
 (0)