Skip to content

Tag: apply

Pandas apply() with axis=0 unexpected behaviour

I’m using the .apply() method in pandas. I get the same results when using axis=0 and axis=1. When using axis=0 I’d expect a series with four elements (indexed A, B, C, D) as a result. Can anyone tell me why the axis argument doesn’t work in this case? I’m adding a reproducible example…