How to use the transform function on data frames

Why not just
df.Average = (df.A + df.B) / 2
?

3 Likes