How can we transform every element inside an array column without exploding the DataFrame rows?
The higher-order transform() function applies a lambda expression to each item in an array natively in Catalyst.
Normalizing, discounting, or formatting nested lists of items without multiplying row volume.
df_discounted = df.withColumn("discounted_prices", transform(col("prices"), lambda x: x * 0.9))Practice typing production-grade PySpark code for Array Transformations with transform().