Answers for "pyspark from_json example"

0

pyspark from_json example

from pyspark.sql.functions import from_json, col
json_schema = spark.read.json(df.rdd.map(lambda row: row.json)).schema
df.withColumn('json', from_json(col('json'), json_schema))
Posted by: Guest on June-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language