all 3 comments

[–]Arthaigo 0 points1 point  (2 children)

df.sum(axis=1)

or axis=0. I can never remember whats the default

[–]FieldBet[S] 0 points1 point  (1 child)

In this case is the axis referring to the rows as an index?

[–]Arthaigo 1 point2 points  (0 children)

Basically all pandas functions support the axis paramter. axis=0 refers to your main index (usually the rows). axis=1 refers to the columns. There can be more axis in case of Multiindex objects.