Skip to content

Does #28827 also apply to applymap? #31620

Closed
@MarcoGorelli

Description

@MarcoGorelli

In #28854, the note

In the current implementation applymap calls func twice on the first column/row to decide whether it can take a fast or slow code path. This can lead to unexpected behavior if func has side-effects, as they will take effect twice for the first column/row.

was removed from the DataFrame.apply docstring.

However, it is still in the docstring of DataFrame.applymap.

Does it need to be removed there too?

EDIT

As far as I can tell, this behaviour (calling the function twice to decide which path to take) still happens for groupby.apply and is what a user was asking about in #31111. Does it need to be documented in Groupby.Apply? Do end-users need to know about such internals?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions