Skip to content

Commit bf84514

Browse files
committed
fix shift/pct_change param types
1 parent 3a222e3 commit bf84514

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pandas-stubs/core/frame.pyi

+3-3
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,8 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
830830
) -> Self: ...
831831
def shift(
832832
self,
833-
periods: int = ...,
834-
freq: DateOffset | dt.timedelta | None = ...,
833+
periods: int | Sequence[int] = ...,
834+
freq: DateOffset | dt.timedelta | _str | None = ...,
835835
axis: Axis = ...,
836836
fill_value: Scalar | NAType | None = ...,
837837
) -> Self: ...
@@ -1989,7 +1989,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
19891989
self,
19901990
periods: int = ...,
19911991
fill_method: None = ...,
1992-
freq: DateOffset | dt.timedelta | None = ...,
1992+
freq: DateOffset | dt.timedelta | _str | None = ...,
19931993
*,
19941994
axis: Axis = ...,
19951995
fill_value: Scalar | NAType | None = ...,

pandas-stubs/core/series.pyi

+4-4
Original file line numberDiff line numberDiff line change
@@ -1130,9 +1130,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
11301130
) -> Series[S1]: ...
11311131
def shift(
11321132
self,
1133-
periods: int = ...,
1134-
freq: DateOffset | timedelta | None = ...,
1135-
axis: AxisIndex = ...,
1133+
periods: int | Sequence[int] = ...,
1134+
freq: DateOffset | timedelta | _str | None = ...,
1135+
axis: Axis = ...,
11361136
fill_value: Scalar | NAType | None = ...,
11371137
) -> UnknownSeries: ...
11381138
def info(
@@ -1550,7 +1550,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
15501550
self,
15511551
periods: int = ...,
15521552
fill_method: None = ...,
1553-
freq: DateOffset | dt.timedelta | None = ...,
1553+
freq: DateOffset | timedelta | _str | None = ...,
15541554
*,
15551555
fill_value: Scalar | NAType | None = ...,
15561556
) -> Series[S1]: ...

0 commit comments

Comments
 (0)