Join GitHub today
DataFrame.apply returns Series #389
Yeah, I haven't seen the underlying code. It just seems that if DataFrame.apply is called on an empty DataFrame and the lambda returns a Series when given an empty Series, the result should be an empty DataFrame. If the lambda returns a scalar, it would make sense the result is an empty Series. Unless I misunderstand apply.
I know this is a pretty degenerate case... and we could work around it - but thanks for thinking about it!