Skip to content

DOC: Update Series.map to reflect usage like DataFrame.map #58184

Open
@WillAyd

Description

@WillAyd

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.Series.map.html

Documentation problem

If you look at the DataFrame.map documentation it starts with Apply a function to a DataFrame elementwise

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.map.html

Suggested fix for documentation

I think the Series documentation should be more explicit about how it can apply elementwise. @rhshadrach would know best but I am under the impression Series.map(lambda x: return x + 1) should be used in place of the very common Series.apply(lambda x: return x + 1) pattern, so would be good to say something about that too

Metadata

Metadata

Assignees

No one assigned

    Labels

    ApplyApply, Aggregate, Transform, MapDocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions