Skip to content

DOC: rolling return type inconsistent with doc #43023

Closed
@debnathshoham

Description

@debnathshoham

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.core.window.rolling.Rolling.min.html

Note: You can check the latest versions of the docs on master here.

Documentation problem

the return type of rolling methods (rolling.min / rolling.max) is mentioned to be same as the original object. But the default return types appears to be float64.

>>> import pandas as pd
>>> s = pd.Series([4, 3, 5, 2, 6])
>>> s.dtypes
dtype('int64')
>>> s.rolling(3).min().dtypes
dtype('float64')
>>> s.rolling(3).max().dtypes
dtype('float64')
>>> s.rolling(3).std().dtypes
dtype('float64')

Suggested fix for documentation

Maybe the doc should mention the default return type

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closing CandidateMay be closeable, needs more eyeballsDocsWindowrolling, ewma, expanding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions