Skip to content

DEPR: is_array_like #52834

Open
Open
@jbrockmendel

Description

@jbrockmendel

is_array_like is a a one-liner return is_list_like(obj) and hasattr(obj, "dtype"). It does not recognize pyarrow objects. Often we use it when we really want something like isinstance(obj, (np.ndarray, Series, Index, ExtensionArray)), which is much more typing-friendly. We should replace its usage with these more specific checks and deprecate it.

Discussed briefly in a dev meeting a couple months ago with generally positive reception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasDtype ConversionsUnexpected or buggy dtype conversionsNeeds DiscussionRequires discussion from core team before further action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions