nchammas opened a new pull request #29510:
URL: https://github.com/apache/spark/pull/29510


   ### What changes were proposed in this pull request?
   
   As discussed in 
https://github.com/apache/spark/pull/29491#discussion_r474451282 and in 
SPARK-32686, this PR un-deprecates Spark's ability to infer a DataFrame schema 
from a list of dictionaries. The ability is Pythonic and matches functionality 
offered by Pandas.
   
   
   ### Why are the changes needed?
   
   This change clarifies to users that this behavior is supported and is not 
going away in the near future.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. There used to be a `UserWarning` for this, but now there isn't.
   
   
   ### How was this patch tested?
   
   I tested this manually.
   
   Before:
   
   ```python
   >>> spark.createDataFrame([{'a': 5}])
   .../python/pyspark/sql/session.py:378: UserWarning: inferring schema from 
dict is deprecated,please use pyspark.sql.Row instead
     warnings.warn("inferring schema from dict is deprecated,"
   DataFrame[a: bigint]
   ```
   
   After:
   
   ```python
   >>> spark.createDataFrame([{'a': 5}])
   DataFrame[a: bigint]
   ```


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

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