Skip to content

"IndexingError: Unalignable boolean Series key provided" when passing an empty object Series #5877

Closed
@sadruddin

Description

@sadruddin

For some reason, with 0.13, an empty object Series is interpreted as a boolean one, when using to fetch elements in another Series:

pandas.Series(['A', 'B'])[pandas.Series([], dtype=object)]

The following works though, so the dtype confusion seems to be confined to empty Series:

pandas.Series(['A', 'B'])[pandas.Series(['C'], dtype=object)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignBugDtype ConversionsUnexpected or buggy dtype conversionsIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions