-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23566][Minor][Doc] Argument name mismatch fixed #20716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -588,6 +588,8 @@ def coalesce(self, numPartitions): | |
| """ | ||
| Returns a new :class:`DataFrame` that has exactly `numPartitions` partitions. | ||
|
|
||
| :param numPartitions: int, to specify the target number of partitions | ||
|
|
||
| Similar to coalesce defined on an :class:`RDD`, this operation results in a | ||
| narrow dependency, e.g. if you go from 1000 partitions to 100 partitions, | ||
| there will not be a shuffle, instead each of the 100 new partitions will | ||
|
|
@@ -612,9 +614,10 @@ def repartition(self, numPartitions, *cols): | |
| Returns a new :class:`DataFrame` partitioned by the given partitioning expressions. The | ||
| resulting DataFrame is hash partitioned. | ||
|
|
||
| ``numPartitions`` can be an int to specify the target number of partitions or a Column. | ||
| If it is a Column, it will be used as the first partitioning column. If not specified, | ||
| the default number of partitions is used. | ||
| :param numPartitions: | ||
| can be an int to specify the target number of partitions or a Column. | ||
| If it is a Column, it will be used as the first partitioning column. If not specified, | ||
| the default number of partitions is used. | ||
|
|
||
| .. versionchanged:: 1.6 | ||
| Added optional arguments to specify the partitioning columns. Also made numPartitions | ||
|
|
@@ -673,9 +676,10 @@ def repartitionByRange(self, numPartitions, *cols): | |
| Returns a new :class:`DataFrame` partitioned by the given partitioning expressions. The | ||
| resulting DataFrame is range partitioned. | ||
|
|
||
| ``numPartitions`` can be an int to specify the target number of partitions or a Column. | ||
| If it is a Column, it will be used as the first partitioning column. If not specified, | ||
| the default number of partitions is used. | ||
| :param numPartitions: | ||
| can be an int to specify the target number of partitions or a Column. | ||
| If it is a Column, it will be used as the first partitioning column. If not specified, | ||
| the default number of partitions is used. | ||
|
|
||
| At least one partition-by expression must be specified. | ||
| When no explicit sort order is specified, "ascending nulls first" is assumed. | ||
|
|
@@ -892,6 +896,8 @@ def colRegex(self, colName): | |
| def alias(self, alias): | ||
| """Returns a new :class:`DataFrame` with an alias set. | ||
|
|
||
| :param alias: string, alias names to be set for the DataFrame. | ||
|
||
|
|
||
| >>> from pyspark.sql.functions import * | ||
| >>> df_as1 = df.alias("df_as1") | ||
| >>> df_as2 = df.alias("df_as2") | ||
|
|
@@ -1900,7 +1906,7 @@ def withColumnRenamed(self, existing, new): | |
| This is a no-op if schema doesn't contain the given column name. | ||
|
|
||
| :param existing: string, name of the existing column to rename. | ||
| :param col: string, new name of the column. | ||
| :param new: string, new name of the column. | ||
|
|
||
| >>> df.withColumnRenamed('age', 'age2').collect() | ||
| [Row(age2=2, name=u'Alice'), Row(age2=5, name=u'Bob')] | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, was maintaining consistency with other
:paramon page.