Skip to content

Commit 001ff46

Browse files
committed
update doctest
1 parent 7d3cb1b commit 001ff46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/pyspark/ml/stat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,24 +154,28 @@ class Summarizer(object):
154154
+-----------------------------------+
155155
|[[1.0,1.0,1.0], 1] |
156156
+-----------------------------------+
157+
<BLANKLINE>
157158
>>> df.select(summarizer.summary(df.features)).show(truncate=False)
158159
+--------------------------------+
159160
|aggregate_metrics(features, 1.0)|
160161
+--------------------------------+
161162
|[[1.0,1.5,2.0], 2] |
162163
+--------------------------------+
164+
<BLANKLINE>
163165
>>> df.select(Summarizer.mean(df.features, df.weight)).show(truncate=False)
164166
+--------------+
165167
|mean(features)|
166168
+--------------+
167169
|[1.0,1.0,1.0] |
168170
+--------------+
171+
<BLANKLINE>
169172
>>> df.select(Summarizer.mean(df.features)).show(truncate=False)
170173
+--------------+
171174
|mean(features)|
172175
+--------------+
173176
|[1.0,1.5,2.0] |
174177
+--------------+
178+
<BLANKLINE>
175179
176180
.. versionadded:: 2.3.0
177181

0 commit comments

Comments
 (0)