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.
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.
@pandas_dev You just have to tell GPT4 to do things in a fully vectorized way and it will do it. And if not on the first try, just regenerate a couple times until it does. It absolutely understands the concept and how to do it.
In many cases, there are ways to avoid using .apply() by using a separate block of code or a few extra lines of code. Many of the uses of .apply() that I've seen are a result of a data scientist trying to write ultra concise code, often at the expense of both readability and speed.
@pandas_dev Damm I use. Apply(). Didn't even knew there is anything else.
@pandas_dev when the fine tuning dataset from github has many rookie commits ...
@pandas_dev Stop trying to be cute on twitter. Your library's behavior is wildly inconsistent/unpredictable and has wasted weeks of my life cleaning up after so-called "data scientists"
@pandas_dev Maybe looking for right solution in your doc take more time than executing .apply() ?