pyspark.sql.functions.
inline
Explodes an array of structs into a table.
New in version 3.4.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
input column of values to explode.
generator expression with the inline exploded result.
See also
explode()
Examples
>>> from pyspark.sql import Row >>> df = spark.createDataFrame([Row(structlist=[Row(a=1, b=2), Row(a=3, b=4)])]) >>> df.select(inline(df.structlist)).show() +---+---+ | a| b| +---+---+ | 1| 2| | 3| 4| +---+---+