Skip to content

REF: Refactor private/circular parts out of dtypes.concat #25273

Closed
@jbrockmendel

Description

@jbrockmendel

A lot of core.dtypes.concat arguably doesn't belong in core.dtypes. In particular functions that induce circular imports, private functions that are used externally, and functions that are more about arrays/indexes than they are about dtypes.

Some of these (_get_series_result_type, _get_frame_result_type) are used in only core.reshape.concat, could go either directly in that module or into a helper module in core.reshape.

Others are class-specific (concat_rangeindex_same_dtype, _concat_sparse, concat_index_asobject) and make more sense in the modules corresponding to those classes (avoiding circular imports). union_categoricals and _concat_categorical probably belong in this group too.

_concat_compat is used in 6 other files, probably shouldn't be private.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InternalsRelated to non-user accessible pandas implementationRefactorInternal refactoring of code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions