mathan_pillai
Databricks Employee
Databricks Employee

Hi Siddhu,

You can use


df.select(sum("col1"), sum("col2"), sum("col3"))
where col1, col2, col3 are the column names for which you would like to find the sum

please let us know if it answers your question

Thanks