HI, How can sum two colums?

Hi to all

I have been trying to sum two columns (new_fiel = “column1” + “colums2”), but I’d been unsuccessful using field operation, some can share me an example? I really appreciate.

@rajjeb1

Have you tried something like this?

SELECT fare_amount, tip_amount, fare_amount+tip_amount total_amt FROM "NYC-taxi-trips"

Hello @rajjeb1 :slightly_smiling_face:

Assume you have two columns in your DataFrame (df) column 1 and column 2. The sum of columns 1 and 2 can be utilized when creating a new column.
df[column1] + df[column2] = df[new field]

Try this and then let me know about the result :+1: