Skip to content

Commit 09713d2

Browse files
committed
structHandlingMode
1 parent 095c2c3 commit 09713d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/pyspark/pandas/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,15 +1367,17 @@ def value_counts(
13671367
('falcon', 'length')],
13681368
)
13691369
1370-
>>> s.index.value_counts().sort_index() # doctest: +SKIP
1370+
>>> spark.conf.set('spark.sql.execution.pandas.structHandlingMode', 'row')
1371+
1372+
>>> s.index.value_counts().sort_index()
13711373
(cow, length) 1
13721374
(cow, weight) 2
13731375
(falcon, length) 2
13741376
(falcon, weight) 1
13751377
(lama, weight) 3
13761378
Name: count, dtype: int64
13771379
1378-
>>> s.index.value_counts(normalize=True).sort_index() # doctest: +SKIP
1380+
>>> s.index.value_counts(normalize=True).sort_index()
13791381
(cow, length) 0.111111
13801382
(cow, weight) 0.222222
13811383
(falcon, length) 0.222222

0 commit comments

Comments
 (0)