Re: Naming an DF aggregated column

2015-05-19 Thread Michael Armbrust
customerDF.groupBy(state).agg(max($discount).alias(newName)) (or .as(...), both functions can take a String or a Symbol) On Tue, May 19, 2015 at 2:11 PM, Cesar Flores ces...@gmail.com wrote: I would like to ask if there is a way of specifying the column name of a data frame aggregation. For

Naming an DF aggregated column

2015-05-19 Thread Cesar Flores
I would like to ask if there is a way of specifying the column name of a data frame aggregation. For example If I do: customerDF.groupBy(state).agg(max($discount)) the name of my aggregated column will be: MAX('discount) Is there a way of changing the name of that column to something else on