Skip to content

BUG: Series.any/all with level keyword should preserve boolean dtype #33449

Closed
@jorisvandenbossche

Description

@jorisvandenbossche
In [5]: s = pd.Series([False, False, True, True, False, True],
                      index=[0, 0, 1, 1, 2, 2], dtype="boolean")  

In [6]: s.all(level=0) 
Out[6]: 
0    False
1     True
2    False
dtype: bool

The dtype of the result could also be boolean instead of bool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions