Skip to content

Add ArrayLike an Dtype definitions to pandas._typing #25942

Closed
@gwrome

Description

@gwrome

The existing type hints in the codebase suggest a couple of easy additions to the pandas._typing module, including

  • ArrayLike = Union[ABCExtensionArray, np.ndarray] and
  • Dtype = Union[str, np.dtype, ExtensionDtype, Type].

These should be added to the typing module and the matching types replaced with the newly defined ones where they occur.

Crossreferences: #25829 and #25791.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Typingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions