Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.2
-
None
-
None
Description
Make it easier to convert numpy arrays to dataframes.
Often we receive errors:
df = spark.createDataFrame(numpy.arange(10)) Can not infer schema for type: <class 'numpy.int64'>
OR
df = spark.createDataFrame(numpy.arange(10.)) Can not infer schema for type: <class 'numpy.float64'>
Today (Spark 3.x) we have to:
spark.createDataFrame(pd.DataFrame(numpy.arange(10.)))
Make this easier with a direct conversion from Numpy arrays to Spark Dataframes.