Also the same thing for groupby agg operation, how can we use one
aggregated result (say min(amount)) to derive another aggregated column?

On Sun, Apr 21, 2019 at 11:24 PM Rishi Shah <rishishah.s...@gmail.com>
wrote:

> Hello All,
>
> How can we use a derived column1 for deriving another column in the same
> dataframe operation statement?
>
> something like:
>
> df = df.withColumn('derived1', lit('something'))
> .withColumn('derived2', col('derived1') == 'something')
>
> --
> Regards,
>
> Rishi Shah
>

Reply via email to