Spark: Select all and add a new column
Here’s how to select all columns and add a new column.
df.select(df['*'], lower(df['text']).alias('lowerText'))
Here’s how to select all columns and add a new column.
df.select(df['*'], lower(df['text']).alias('lowerText'))
Leave a comment