(TIL) Spark: Select all and add a new column

less than 1 minute read

Here’s how to select all columns and add a new column.

df.select(df['*'], lower(df['text']).alias('lowerText'))

Tags: ,

Categories:

Updated:

Comments