Skip to content

inplace argument should be optional in ffill() and bfill() #44

Closed
@crusaderky

Description

@crusaderky

mypy 0.961
pandas-stubs 1.4.2.220626

df: pandas.DataFrame
df.ffill()
df.bfill()

output:

error: All overload variants of "ffill" of "DataFrame" require at least one argument  [call-overload]
note: Possible overload variants:
note:     def ffill(self, axis: Optional[Literal['columns', 'index', 0, 1]] = ..., *, inplace: Literal[True], limit: Optional[int] = ..., downcast: Optional[Dict[Any, Any]] = ...) -> None
note:     def ffill(self, axis: Optional[Literal['columns', 'index', 0, 1]] = ..., *, inplace: Literal[False], limit: Optional[int] = ..., downcast: Optional[Dict[Any, Any]] = ...) -> DataFrame
error: All overload variants of "bfill" of "DataFrame" require at least one argument  [call-overload]
note:     def bfill(self, axis: Optional[Literal['columns', 'index', 0, 1]] = ..., *, inplace: Literal[True], limit: Optional[int] = ..., downcast: Optional[Dict[Any, Any]] = ...) -> None
note:     def bfill(self, axis: Optional[Literal['columns', 'index', 0, 1]] = ..., *, inplace: Literal[False], limit: Optional[int] = ..., downcast: Optional[Dict[Any, Any]] = ...) -> DataFrame

From the documentation:

inplace bool, default False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions