Skip to content

TYP: FrameOrSeriesUnion #36475

Closed
Closed
@rhshadrach

Description

@rhshadrach

From the discussion in PR #36409 it was mentioned that it is undesirable to type API functions as NDFrame as this may be confusing from a user perspective since it shows up in the docs. Currently the difference between NDFrame and FrameOrSeriesUnion = Union[DataFrame, Series] is that the former can be used in methods of NDFrame (and those called from NDFrame methods) whereas the latter cannot.

Is there a benefit to this restriction? If not, I propose changing FrameOrSeriesUnion to be an alias of NDFrame. This would then be user-friendly for the docs.

cc @simonjayhawkins @WillAyd @jreback

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionRequires discussion from core team before further actionTypingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions