Skip to content
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

[SPARK-46730][PYTHON][DOCS] Refine docstring of str_to_map/map_filter/map_zip_with #44747

Closed
wants to merge 6 commits into from

Conversation

LuciferYang
Copy link
Contributor

What changes were proposed in this pull request?

This pr refine docstring of str_to_map/map_filter/map_zip_with and add some new examples.

Why are the changes needed?

To improve PySpark documentation

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass Github Actions

Was this patch authored or co-authored using generative AI tooling?

No

... sf.map_filter("data", lambda k, _: k.startswith("b")).alias("data_filtered")
... ).head()
>>> sorted(row["data_filtered"].items())
[('bar', 1.0), ('baz', 32.0)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not use the 'show' because the result data sorting is not stable

... ).alias("updated_data")
... ).head()
>>> sorted(row["updated_data"].items())
[('A', 4), ('B', -2)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not use the 'show' because the result data sorting is not stable

@github-actions github-actions bot removed the INFRA label Jan 16, 2024
@LuciferYang LuciferYang marked this pull request as ready for review January 16, 2024 12:41
@HyukjinKwon
Copy link
Member

Merged to master.

@LuciferYang
Copy link
Contributor Author

Thanks @HyukjinKwon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants