This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 7e65b12 [MINOR][DOCS][EXAMPLE] Fix the Python manual_load_options_csv
example
7e65b12 is described below
commit 7e65b12e5ac80344cd25d82a45d2447e369c3250
Author: Keiji Yoshida <[email protected]>
AuthorDate: Sun Oct 18 16:47:04 2020 +0900
[MINOR][DOCS][EXAMPLE] Fix the Python manual_load_options_csv example
### What changes were proposed in this pull request?
This pull request changes the `sep` parameter's value from `:` to `;` in
the example of `examples/src/main/python/sql/datasource.py`. This code snippet
is shown on the Spark SQL Guide documentation. The `sep` parameter's value
should be `;` since the data in
https://github.com/apache/spark/blob/master/examples/src/main/resources/people.csv
is separated by `;`.
### Why are the changes needed?
To fix the example code so that it can be executed properly.
### Does this PR introduce _any_ user-facing change?
Yes.
This code snippet is shown on the Spark SQL Guide documentation:
https://spark.apache.org/docs/latest/sql-data-sources-load-save-functions.html#manually-specifying-options
### How was this patch tested?
By building the documentation and checking the Spark SQL Guide
documentation manually in the local environment.
Closes #30082 from kjmrknsn/fix-example-python-datasource.
Authored-by: Keiji Yoshida <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
---
examples/src/main/python/sql/datasource.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/src/main/python/sql/datasource.py
b/examples/src/main/python/sql/datasource.py
index 265f135..9f8fdd7 100644
--- a/examples/src/main/python/sql/datasource.py
+++ b/examples/src/main/python/sql/datasource.py
@@ -96,7 +96,7 @@ def basic_datasource_example(spark):
# $example on:manual_load_options_csv$
df = spark.read.load("examples/src/main/resources/people.csv",
- format="csv", sep=":", inferSchema="true",
header="true")
+ format="csv", sep=";", inferSchema="true",
header="true")
# $example off:manual_load_options_csv$
# $example on:manual_save_options_orc$
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]