We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 095c2c3 commit 09713d2Copy full SHA for 09713d2
python/pyspark/pandas/base.py
@@ -1367,15 +1367,17 @@ def value_counts(
1367
('falcon', 'length')],
1368
)
1369
1370
- >>> s.index.value_counts().sort_index() # doctest: +SKIP
+ >>> spark.conf.set('spark.sql.execution.pandas.structHandlingMode', 'row')
1371
+
1372
+ >>> s.index.value_counts().sort_index()
1373
(cow, length) 1
1374
(cow, weight) 2
1375
(falcon, length) 2
1376
(falcon, weight) 1
1377
(lama, weight) 3
1378
Name: count, dtype: int64
1379
- >>> s.index.value_counts(normalize=True).sort_index() # doctest: +SKIP
1380
+ >>> s.index.value_counts(normalize=True).sort_index()
1381
(cow, length) 0.111111
1382
(cow, weight) 0.222222
1383
(falcon, length) 0.222222
0 commit comments