Hi Rishi,
TL;DR Using Scala, this would work
df.withColumn("derived1", lit("something")).withColumn("derived2",
col("derived1") === "something")
just note that I used 3 equal to signs instead of just two. That should be
enough, if you want to understand why read further.
so "==" gives boolean as
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
wrote:
> Hello All,
>
> How can we use a derived column1 for deriving another column in the same
> dataframe oper