@@ -588,6 +588,8 @@ def coalesce(self, numPartitions):
588588 """
589589 Returns a new :class:`DataFrame` that has exactly `numPartitions` partitions.
590590
591+ :param numPartitions: int, to specify the target number of partitions
592+
591593 Similar to coalesce defined on an :class:`RDD`, this operation results in a
592594 narrow dependency, e.g. if you go from 1000 partitions to 100 partitions,
593595 there will not be a shuffle, instead each of the 100 new partitions will
@@ -612,9 +614,10 @@ def repartition(self, numPartitions, *cols):
612614 Returns a new :class:`DataFrame` partitioned by the given partitioning expressions. The
613615 resulting DataFrame is hash partitioned.
614616
615- ``numPartitions`` can be an int to specify the target number of partitions or a Column.
616- If it is a Column, it will be used as the first partitioning column. If not specified,
617- the default number of partitions is used.
617+ :param numPartitions:
618+ can be an int to specify the target number of partitions or a Column.
619+ If it is a Column, it will be used as the first partitioning column. If not specified,
620+ the default number of partitions is used.
618621
619622 .. versionchanged:: 1.6
620623 Added optional arguments to specify the partitioning columns. Also made numPartitions
@@ -673,9 +676,10 @@ def repartitionByRange(self, numPartitions, *cols):
673676 Returns a new :class:`DataFrame` partitioned by the given partitioning expressions. The
674677 resulting DataFrame is range partitioned.
675678
676- ``numPartitions`` can be an int to specify the target number of partitions or a Column.
677- If it is a Column, it will be used as the first partitioning column. If not specified,
678- the default number of partitions is used.
679+ :param numPartitions:
680+ can be an int to specify the target number of partitions or a Column.
681+ If it is a Column, it will be used as the first partitioning column. If not specified,
682+ the default number of partitions is used.
679683
680684 At least one partition-by expression must be specified.
681685 When no explicit sort order is specified, "ascending nulls first" is assumed.
@@ -892,6 +896,8 @@ def colRegex(self, colName):
892896 def alias (self , alias ):
893897 """Returns a new :class:`DataFrame` with an alias set.
894898
899+ :param alias: string, an alias name to be set for the DataFrame.
900+
895901 >>> from pyspark.sql.functions import *
896902 >>> df_as1 = df.alias("df_as1")
897903 >>> df_as2 = df.alias("df_as2")
@@ -1900,7 +1906,7 @@ def withColumnRenamed(self, existing, new):
19001906 This is a no-op if schema doesn't contain the given column name.
19011907
19021908 :param existing: string, name of the existing column to rename.
1903- :param col : string, new name of the column.
1909+ :param new : string, new name of the column.
19041910
19051911 >>> df.withColumnRenamed('age', 'age2').collect()
19061912 [Row(age2=2, name=u'Alice'), Row(age2=5, name=u'Bob')]
0 commit comments