If I have a dataframe:
A B C
1 2 3
4 5 6
7 8 9
and I want to add a column D that is the sum of columns A,B,C how do I write a function that will do that and add the result as column D to the data frame?
If I have a dataframe:
A B C
1 2 3
4 5 6
7 8 9
and I want to add a column D that is the sum of columns A,B,C how do I write a function that will do that and add the result as column D to the data frame?