You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2023/10/31 23:37:29 UTC
(spark) branch master updated: [MINOR][DOCS] Fix the variable name in the docs - testing_pyspark.ipynb
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 285e97465a5 [MINOR][DOCS] Fix the variable name in the docs - testing_pyspark.ipynb
285e97465a5 is described below
commit 285e97465a5365c2cc227c9ece32d51d7ebb0483
Author: huciaa <hu...@pm.me>
AuthorDate: Wed Nov 1 08:37:15 2023 +0900
[MINOR][DOCS] Fix the variable name in the docs - testing_pyspark.ipynb
### What changes were proposed in this pull request?
I'm changing a variable name in one of the cells in the documentation regarding pyspark testing.
### Why are the changes needed?
Currently the code won't run. This simple fix will make the code in the documenatatnion usable.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
I tested this code loccally with pytest and pyspark 3.5.0
![image](https://github.com/apache/spark/assets/51126637/3a29a495-38d3-492c-b192-3e26af6fc72c)
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #43610 from huciaa/fix_typo_in_pystest_doc.
Authored-by: huciaa <hu...@pm.me>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
python/docs/source/getting_started/testing_pyspark.ipynb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/docs/source/getting_started/testing_pyspark.ipynb b/python/docs/source/getting_started/testing_pyspark.ipynb
index afccbe4004c..3934c116763 100644
--- a/python/docs/source/getting_started/testing_pyspark.ipynb
+++ b/python/docs/source/getting_started/testing_pyspark.ipynb
@@ -318,7 +318,7 @@
" {\"name\": \"Eve A.\", \"age\": 28}] \n",
" \n",
" # Create a Spark DataFrame\n",
- " original_df = spark.createDataFrame(sample_data)\n",
+ " original_df = spark_fixture.createDataFrame(sample_data)\n",
" \n",
" # Apply the transformation function from before\n",
" transformed_df = remove_extra_spaces(original_df, \"name\")\n",
@@ -328,7 +328,7 @@
" {\"name\": \"Bob T.\", \"age\": 35}, \n",
" {\"name\": \"Eve A.\", \"age\": 28}]\n",
" \n",
- " expected_df = spark.createDataFrame(expected_data)\n",
+ " expected_df = spark_fixture.createDataFrame(expected_data)\n",
"\n",
" assertDataFrameEqual(transformed_df, expected_df)"
]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org