I have a dataframe:
A B C v1 v2 v3
q 2 3 4 9 1
8 f 2 7 4 7
I want to calc a new columns, that will have the RMS (sqrt(sum(x^2)) of all the v columns.
So the new df will be:
A B C v1 v2 v3 v_rms
q 2 3 4 9 1 9.9
8 f 2 7 2 4 8.3
since sqrt(4^2 + 9^2 + 1^2) = 9.9, sqrt(7^2 + 2^2 + 4^2) = 8.3
What is the best way to do so?