Artificial intelligence may not be so intelligent if it uses pandas .apply() when not strictly necessary.
Our operations are usually vectorized (very fast), .apply() is usually not, so it may be very slow.
Avoid loops and apply if a pandas operation exists for what you need.
I love GPT-4 code assistant but it uses .apply() for every bit of pandas code and I ain't about it