Skip to content

Issue with concat and passing a Union due to presence of checking for Iterable[None] #879

Closed
@Dr-Irv

Description

@Dr-Irv

You are right, the example doesn't work, my bad. This example does work though, and the same question still applies.

data: pd.DataFrame | pd.Series = pd.Series()

pd.concat([pd.DataFrame(), data])

returns

error: List item 0 has incompatible type "DataFrame"; expected "None"  [list-item]
error: List item 1 has incompatible type "DataFrame | Series[Any]"; expected "None"  [list-item]

Originally posted by @tvdboom in #878 (comment)

Metadata

Metadata

Assignees

Labels

ReshapingConcat, 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