xinrong-meng opened a new pull request, #49394:
URL: https://github.com/apache/spark/pull/49394
### What changes were proposed in this pull request?
Make DataFrame.plot a class variable
### Why are the changes needed?
Previously
```
>>> from pyspark.sql import DataFrame
>>> DataFrame.plot
<property object at 0x10543fd60>
>>> dir(DataFrame.plot)
['__class__', '__delattr__', '__delete__', '__dir__', '__doc__', '__eq__',
'__format__', '__ge__', '__get__', '__getattribute__', '__gt__', '__hash__',
'__init__', '__init_subclass__', '__isabstractmethod__', '__le__', '__lt__',
'__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__set__',
'__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'deleter', 'fdel',
'fget', 'fset', 'getter', 'setter']
```
Making sphinx failed to recognize plot accessor's chaining plot methods:
"bar", "barh", etc, thus, failed to populate docs for plot methods.
Compared with Pandas API on Spark
```
>>> import pyspark.pandas as ps
>>> ps.DataFrame.plot
<class 'pyspark.pandas.plot.core.PandasOnSparkPlotAccessor'>
```
We want them to reach parity.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
### Was this patch authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]