Skip to content

Commit

Permalink
Fix a python test suite error caused by python 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 1, 2015
1 parent c2d6bcb commit aa9469d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/pyspark/ml/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ class KMeans(JavaEstimator, HasFeaturesCol, HasMaxIter, HasSeed):
>>> len(centers)
2
>>> transformed = model.transform(df)
>>> transformed.columns
[u'features', u'prediction']
>>> (transformed.columns)[0] == 'features'
True
>>> (transformed.columns)[1] == 'prediction'
True
>>> rows = sorted(transformed.collect(), key = lambda r: r[0])
>>> rows[0].prediction == rows[1].prediction
True
Expand Down

0 comments on commit aa9469d

Please sign in to comment.