Skip to content

Commit 204f360

Browse files
felixcheungrxin
authored andcommitted
[SPARK-11984][SQL][PYTHON] Fix typos in doc for pivot for scala and python
Author: felixcheung <[email protected]> Closes #9967 from felixcheung/pypivotdoc. (cherry picked from commit faabdfa) Signed-off-by: Reynold Xin <[email protected]>
1 parent 400f66f commit 204f360

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

python/pyspark/sql/group.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ def sum(self, *cols):
169169

170170
@since(1.6)
171171
def pivot(self, pivot_col, values=None):
172-
"""Pivots a column of the current DataFrame and preform the specified aggregation.
172+
"""Pivots a column of the current DataFrame and perform the specified aggregation.
173173
174174
:param pivot_col: Column to pivot
175-
:param values: Optional list of values of pivotColumn that will be translated to columns in
176-
the output data frame. If values are not provided the method with do an immediate call
175+
:param values: Optional list of values of pivot column that will be translated to columns in
176+
the output DataFrame. If values are not provided the method will do an immediate call
177177
to .distinct() on the pivot column.
178178
179179
>>> df4.groupBy("year").pivot("course", ["dotNET", "Java"]).sum("earnings").collect()

sql/core/src/main/scala/org/apache/spark/sql/GroupedData.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class GroupedData protected[sql](
282282
}
283283

284284
/**
285-
* Pivots a column of the current [[DataFrame]] and preform the specified aggregation.
285+
* Pivots a column of the current [[DataFrame]] and perform the specified aggregation.
286286
* There are two versions of pivot function: one that requires the caller to specify the list
287287
* of distinct values to pivot on, and one that does not. The latter is more concise but less
288288
* efficient, because Spark needs to first compute the list of distinct values internally.
@@ -321,7 +321,7 @@ class GroupedData protected[sql](
321321
}
322322

323323
/**
324-
* Pivots a column of the current [[DataFrame]] and preform the specified aggregation.
324+
* Pivots a column of the current [[DataFrame]] and perform the specified aggregation.
325325
* There are two versions of pivot function: one that requires the caller to specify the list
326326
* of distinct values to pivot on, and one that does not. The latter is more concise but less
327327
* efficient, because Spark needs to first compute the list of distinct values internally.
@@ -353,7 +353,7 @@ class GroupedData protected[sql](
353353
}
354354

355355
/**
356-
* Pivots a column of the current [[DataFrame]] and preform the specified aggregation.
356+
* Pivots a column of the current [[DataFrame]] and perform the specified aggregation.
357357
* There are two versions of pivot function: one that requires the caller to specify the list
358358
* of distinct values to pivot on, and one that does not. The latter is more concise but less
359359
* efficient, because Spark needs to first compute the list of distinct values internally.

0 commit comments

Comments
 (0)