Skip to content

DOC: Write user guide page on apply/map/transform methods #61126

Closed
@datapythonista

Description

@datapythonista
Member

There is some information in our documentation regarding how to use user defined functions in pandas. The API pages of the used methods, and these sections:

My understanding is that we've been mostly discouraging the use of functions like apply, or at least the community has with many posts and comments regarding apply is slow, which seem fair. With the work going on supporting JIT compilers on these functions (see #54666 and #61032) this can hopefully change, and allow in some cases for clearer code while not compromising speed.

I think it may be difficult to communicate all the information related to udf in the existing sections on group by and FAQ pages and in the API docs. A dedicated page in the users guide that guides users on when to use udf, a general idea of the API, the differences between the different methods, the options available... seems a better idea.

Also, the APIs of the different methods are quite inconsistent, and in some cases cumbersome. I think writing this page will be a good exercise to identify cases when explaining the functionality to the users is complex and not intuitive, and see if we can address them.

Activity

arthurlw

arthurlw commented on Mar 23, 2025

@arthurlw
Member

I'm interested in working on this user guide. Just to clarify, this user guide should provide guidance on everything about udfs (when to use them, their differences, etc), rather than just document what they do, correct?

arthurlw

arthurlw commented on Mar 24, 2025

@arthurlw
Member

take

rhshadrach

rhshadrach commented on Mar 29, 2025

@rhshadrach
Member

Also, the APIs of the different methods are quite inconsistent, and in some cases cumbersome.

Related: #40112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ApplyApply, Aggregate, Transform, MapDocs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @datapythonista@rhshadrach@arthurlw

    Issue actions

      DOC: Write user guide page on apply/map/transform methods · Issue #61126 · pandas-dev/pandas