-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46560][PYTHON][DOCS] Refine docstring reverse/map_contains_key
#44561
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
Conversation
| Examples | ||
| -------- | ||
| Example 1: Reverse a string | ||
|
|
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.
Let's standardize the format:
- import functions as sf and import other necessaries
- try not to use
.alias - perhaps
showis clearer thancollectwhen displaying results.
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.
Done
Co-authored-by: YangJie <[email protected]>
|
|
||
| Example 2: Reverse an array | ||
|
|
||
| >>> df = spark.createDataFrame([([2, 1, 3],) ,([1],) ,([],)], ['data']) |
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.
nit, is this line duplicated?
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.
For self-contained, the data is also repeated once in each example.
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 mean df is defined twice in this example
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.
Oh, I made a mistake. It was defined twice in this example and let me to remove it.
Done.
### What changes were proposed in this pull request? The pr aims to refine docstring of `reverse/map_contains_key`. ### Why are the changes needed? To improve PySpark documentation. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#44561 from panbingkun/SPARK-46560. Lead-authored-by: panbingkun <[email protected]> Co-authored-by: panbingkun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
The pr aims to refine docstring of
reverse/map_contains_key.Why are the changes needed?
To improve PySpark documentation.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manually test.
Was this patch authored or co-authored using generative AI tooling?
No.