Skip to content

Deprecate accepting None in pd.concat #57846

Description

@twoertwein

pd.concat accepts iterables that may contain Series, DataFrame and None, where None are simply ignored.

pd.concat([None, series, None, series, None]) # works, same as pd.concat([series, series])
pd.concat([None]) # raises

It would be great to deprecate/remove accepting Nones. This will help to better annotate concat pandas-dev/pandas-stubs#888

Pandas-stubs currently has to choose between either false-positives (accept concat([None]) ) or false-negatives (reject some concat(Iterable[Any/Unknown]) that could succeed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasNeeds DiscussionRequires discussion from core team before further actionReshapingConcat, 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