hari-prasad
Valued Contributor II

Hi @David_Billa ,

You can use following from_json function in spark which can convert struct into individual column. Refer this link https://spark.apache.org/docs/3.4.0/api/python/reference/pyspark.sql/api/pyspark.sql.functions.from_....

Also, you can use dot notation to access individual column from struct, like df.withColumn('Ord', col('prices.Ord')).

 

Regards,
Hari Prasad



Regards,
Hari Prasad