Skip to content

[SPARK-52270][PYTHON][DOCS] User guide for native plotting #50992

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions python/docs/source/user_guide/dataframes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,25 @@
"source": [
"df.write().mode(\"overwrite\").saveAsTable(\"schemaName.tableName\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Native DataFrame Plotting\n",
"\n",
"PySpark supports native plotting, allowing users to visualize data directly from PySpark DataFrames.\n",
"\n",
"The user interacts with PySpark Plotting by calling the `plot` property on a PySpark DataFrame and specifying the desired type of plot, either as a submethod or by setting the `kind` parameter. For instance:\n",
"\n",
"`df.plot.line(x=\"category\", y=\"int_val\")`\n",
"\n",
"or equivalently:\n",
"\n",
"`df.plot(kind=\"line\", x=\"category\", y=\"int_val\")`\n",
"\n",
"The feature is powered by [Plotly](https://plotly.com/python/) as the default visualization backend, offering rich, interactive plotting capabilities, while native [pandas](https://pandas.pydata.org/) is used internally to process data for most plots.\n"
]
}
],
"metadata": {
Expand Down