[
https://issues.apache.org/jira/browse/SPARK-50753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xinrong Meng updated SPARK-50753:
---------------------------------
Description: (was: Previously, the plot property in PySpark DataFrame
was simply a placeholder:
```py
>>> from pyspark.sql import DataFrame
>>> DataFrame.plot
<property object at 0x10543fd60>
>>> dir(DataFrame.plot)
['__class__', ... 'getter', 'setter']
```
This caused an issue where Sphinx, the documentation generator, could not
recognize the chaining methods (e.g., bar, barh, etc.) provided by the plot
accessor. As a result, it failed to populate the documentation for the
available plot methods.
We aim to bring PySpark’s plot accessor to parity with the Pandas API on Spark
```py
>>> import pyspark.pandas as ps
>>> ps.DataFrame.plot
<class 'pyspark.pandas.plot.core.PandasOnSparkPlotAccessor'>
```
The plot property in PySpark DataFrame should look like this
```py
>>> from pyspark.sql import DataFrame
>>> DataFrame.plot
<pyspark.sql.plot.core.PySparkPlotAccessor object at 0x10500b070>
>>> dir(DataFrame.plot)
['__call__', ..., '_backends', '_get_plot_backend', 'area', 'bar', 'barh',
'box', 'data', 'hist', 'kde', 'line', 'pie', 'plot_data_map', 'scatter']
```)
> Add pyspark plotting to API documentation
> -----------------------------------------
>
> Key: SPARK-50753
> URL: https://issues.apache.org/jira/browse/SPARK-50753
> Project: Spark
> Issue Type: Sub-task
> Components: Documentation, PySpark
> Affects Versions: 4.0.0
> Reporter: Xinrong Meng
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]