Skip to content

Confusing - rolling min( ) function "accepting" objects #20244

Closed
@gojandrooo

Description

@gojandrooo

Code Sample, a copy-pastable example if possible

s = pd.Series([3,1,2,'x','y','z'])

s.rolling(2).min()

0    3
1    1
2    2
3    x
4    y
5    z
dtype: object

Problem description

Should raise an exception because the series contains objects. Instead, function returns the series.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugWindowrolling, ewma, expanding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions