Skip to content

PERF: unnecessary casting in merge #44240

Closed
@jbrockmendel

Description

@jbrockmendel

  • I have checked that this issue has not already been reported.

  • I have confirmed this issue exists on the latest version of pandas.

  • I have confirmed this issue exists on the master branch of pandas.

Reproducible Example

In reshape.merge we do some some casting motivated by what dtypes HashTable supports, see the comment '# upcast 'by' parameter because HashTable is limited'. That comment is no longer accurate, and we can avoid some of this casting. Something like core.algorithms._ensure_data may be reusable.

Installed Versions

Replace this line with the output of pd.show_versions()

Prior Performance

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    PerformanceMemory or execution speed performanceReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions