xinrong-databricks opened a new pull request #34608:
URL: https://github.com/apache/spark/pull/34608


   ### What changes were proposed in this pull request?
   The PR is proposed to rename (Spark)DataFrame.to_pandas_on_spark to 
(Spark)DataFrame.pandas_api.
   
   ### Why are the changes needed?
   Currently, (Spark)DataFrame.to_pandas_on_spark is too long to memorize and 
inconvenient to call.
   The PR is proposed to rename (Spark)DataFrame.to_pandas_on_spark to 
(Spark)DataFrame.pandas_api.
   We may improve the user experience and make APIs more developer-friendly by 
implementing that.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   (Spark)DataFrame.to_pandas_on_spark is renamed to (Spark)DataFrame.pandas_api
   
   ```py
   >>> sdf = spark.createDataFrame([{'name': 'Alice', 'age': 1}])
   
   >>> sdf.pandas_api()
      age   name
   0    1  Alice
   
   >>> sdf.to_pandas_on_spark()
   Traceback (most recent call last):
   ...
   AttributeError: 'DataFrame' object has no attribute 'to_pandas_on_spark'
   ```
   
   ### How was this patch tested?
   Existing tests.


-- 
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]

Reply via email to