When should I (not) want to use pandas apply() in my code?
apply, the Convenience Function you Never Needed We start by addressing the questions in the OP, one by one. “If apply is so bad, then why is it in the API?” DataFrame.apply and Series.apply are convenience functions defined on DataFrame and Series object respectively. apply accepts any user defined function that applies a transformation/aggregation on … Read more