hello

how to add a column for percent for the current row of counted data?

scala>
df2.groupBy("_c1").count.withColumn("percent",f"${col(count)/df2.count}%.2f").show

<console>:30: error: type mismatch;


This doesn't work.

so please help. thanks.

Reply via email to