[MINOR][PYTHON][DOCS] Make mapInPandas example copy-pastable#41655
Closed
HyukjinKwon wants to merge 1 commit intoapache:masterfrom
Closed
[MINOR][PYTHON][DOCS] Make mapInPandas example copy-pastable#41655HyukjinKwon wants to merge 1 commit intoapache:masterfrom
HyukjinKwon wants to merge 1 commit intoapache:masterfrom
Conversation
zhengruifeng
approved these changes
Jun 19, 2023
Member
Author
|
I already locally checked the build. Merging it in. Merged to master. |
czxm
pushed a commit
to czxm/spark
that referenced
this pull request
Jun 19, 2023
### What changes were proposed in this pull request? This PR proposes to add one newline into the example of `mapInPandas`. ### Why are the changes needed? You copy and paste the example:  and it does not work: ``` >>> def filter_func(iterator): ... for pdf in iterator: ... yield pdf[pdf.id == 1] ... df.mapInPandas(filter_func, df.schema).show() File "<stdin>", line 4 df.mapInPandas(filter_func, df.schema).show() ^ ``` We should add one more line to match ### Does this PR introduce _any_ user-facing change? Yes, it changes the example of `mapInPandas` copy-pastable ### How was this patch tested? Manually tested. Closes apache#41655 from HyukjinKwon/minor-doc. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
MaxGekk
pushed a commit
that referenced
this pull request
Jun 19, 2023
…ewline in all modules ### What changes were proposed in this pull request? I found that there are many instances same as #41655. This PR aims to address all the examples in all components in PySpark. ### Why are the changes needed? See #41655. ### Does this PR introduce _any_ user-facing change? Yes, it changes the documentation and makes the example copy-pastable, see also #41655. ### How was this patch tested? CI in this PR should validate them. This is logically the same as #41655. I will also build the documentation locally and test. Closes #41657 from HyukjinKwon/minor-newlines. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Max Gekk <max.gekk@gmail.com>
czxm
pushed a commit
to czxm/spark
that referenced
this pull request
Jun 19, 2023
…ewline in all modules ### What changes were proposed in this pull request? I found that there are many instances same as apache#41655. This PR aims to address all the examples in all components in PySpark. ### Why are the changes needed? See apache#41655. ### Does this PR introduce _any_ user-facing change? Yes, it changes the documentation and makes the example copy-pastable, see also apache#41655. ### How was this patch tested? CI in this PR should validate them. This is logically the same as apache#41655. I will also build the documentation locally and test. Closes apache#41657 from HyukjinKwon/minor-newlines. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Max Gekk <max.gekk@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
This PR proposes to add one newline into the example of
mapInPandas.Why are the changes needed?
You copy and paste the example:
and it does not work:
We should add one more line to match
Does this PR introduce any user-facing change?
Yes, it changes the example of
mapInPandascopy-pastableHow was this patch tested?
Manually tested.