-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DataFrame.apply documentation needs upgrade #17972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
pls be more specific here. |
further in master .apply has gained some examples (to the doc-string). |
I know you dislike I think it's probably OK to have a couple basic examples of using it when it's not necessary to teach the mechanics but after that, it should be followed with the idiomatic vectorized version. You could have a simple set of rules when it is considered OK to use
|
sure all for a warning box |
Ok cool. I'll make some changes to the apply docs in the next few days. |
Problem description
I believe the only place that
apply
is mentioned in detail in the documentation is in the essential basic functionality.All the examples do not need
apply
, and can be done quicker with other methods. In fact, they actively teach how not to use pandas correctly. For instance,idxmax
andinterploate
are both dataframe methods and from the documentation, they appear to be good use-cases forapply
, which they are not.Expected Output
I understand that it makes sense to use basic examples to motivate
apply
. But there should be some useful examples whereapply
is necessary.Most of the examples should be replaced (or shown how to be duplicated with more idiomatic methods).
The text was updated successfully, but these errors were encountered: