Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
fill_method: None = None,
freq: Frequency | dt.timedelta | None = ...,
fill_value: Scalar | NAType | None = ...,
axis: Axis | None = ...,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about **kwargs? Can we just add **kwargs: Any or copy-paste all additional arguments from DataFrame.shift or Series.shift?

) -> Self: ...
def pop(self, item: _str) -> Series: ...
def pow(
Expand Down
4 changes: 4 additions & 0 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2820,6 +2820,10 @@ def test_dataframe_pct_change() -> None:
pd.DataFrame,
)
check(assert_type(df.pct_change(fill_value=0), pd.DataFrame), pd.DataFrame)
check(assert_type(df.pct_change(axis=0), pd.DataFrame), pd.DataFrame)
check(assert_type(df.pct_change(axis=1), pd.DataFrame), pd.DataFrame)
check(assert_type(df.pct_change(axis="columns"), pd.DataFrame), pd.DataFrame)
check(assert_type(df.pct_change(axis="index"), pd.DataFrame), pd.DataFrame)


def test_indexslice_setitem() -> None:
Expand Down