Norm along row in pandas
One line, using whatever function you desire (including lambda functions), e.g.
df.apply(np.linalg.norm, axis=1)
or
df.apply(lambda x: (x**2).sum()**.5, axis=1)
Numpy provides norm... Use:
np.linalg.norm(df[['X','Y','Z']].values,axis=1)
I found a faster solution than what @elyase suggested:
np.sqrt(np.square(df).sum(axis=1))