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.
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.
Have you tried something like this?
SELECT fare_amount, tip_amount, fare_amount+tip_amount total_amt FROM "NYC-taxi-trips"
Hello @rajjeb1
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