When should I ever want to use pandas apply() in my code?
问题 I have seen many answers posted to questions on Stack Overflow involving the use of the Pandas method apply . I have also seen users commenting under them saying that \" apply is slow, and should be avoided\". I have read many articles on the topic of performance that explain apply is slow. I have also seen a disclaimer in the docs about how apply is simply a convenience function for passing UDFs (can\'t seem to find that now). So, the general consensus is that apply should be avoided if