Skip to content

Commit f66a445

Browse files
author
Wayne Zhang
committed
fix test error
1 parent 44f0a36 commit f66a445

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/pyspark/ml/feature.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,8 @@ class StringIndexer(JavaEstimator, HasInputCol, HasOutputCol, HasHandleInvalid,
21142114
True
21152115
>>> stringIndexer.getStringOrderType()
21162116
'frequencyDesc'
2117-
>>> stringIndexer.setStringOrderType("alphabetDesc")
2117+
>>> stringIndexer = StringIndexer(inputCol="label", outputCol="indexed", handleInvalid='error',
2118+
... stringOrderType="alphabetDesc")
21182119
>>> model = stringIndexer.fit(stringIndDf)
21192120
>>> td = model.transform(stringIndDf)
21202121
>>> sorted(set([(i[0], i[1]) for i in td.select(td.id, td.indexed).collect()]),

0 commit comments

Comments
 (0)