Skip to content

Commit c0ab69b

Browse files
committed
address comments
1 parent fc66d9a commit c0ab69b

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ from pandas._libs.lib import NoDefault
6767
from pandas._libs.missing import NAType
6868
from pandas._libs.tslibs import BaseOffset
6969
from pandas._libs.tslibs.nattype import NaTType
70+
from pandas._libs.tslibs.offsets import DateOffset
7071
from pandas._typing import (
7172
S1,
7273
AggFuncTypeBase,
@@ -87,7 +88,6 @@ from pandas._typing import (
8788
FilePath,
8889
FillnaOptions,
8990
FormattersType,
90-
Frequency,
9191
GroupByObjectNonScalar,
9292
HashableT,
9393
HashableT1,
@@ -831,9 +831,9 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
831831
def shift(
832832
self,
833833
periods: int = ...,
834-
freq: Frequency | dt.timedelta | None = ...,
834+
freq: DateOffset | dt.timedelta | None = ...,
835835
axis: Axis = ...,
836-
fill_value: Hashable | None = ...,
836+
fill_value: Scalar | NAType | None = ...,
837837
) -> Self: ...
838838
@overload
839839
def set_index(
@@ -1987,13 +1987,12 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
19871987
def ne(self, other, axis: Axis = ..., level: Level | None = ...) -> Self: ...
19881988
def pct_change(
19891989
self,
1990-
periods: int = 1,
1990+
periods: int = ...,
19911991
fill_method: None = ...,
1992-
limit: int | None = ...,
1993-
freq: Frequency | dt.timedelta | None = None,
1992+
freq: DateOffset | dt.timedelta | None = ...,
19941993
*,
19951994
axis: AxisIndex = ...,
1996-
fill_value: object | None = ...,
1995+
fill_value: Scalar | NAType | None = ...,
19971996
) -> Self: ...
19981997
def pop(self, item: _str) -> Series: ...
19991998
def pow(

pandas-stubs/core/series.pyi

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ from pandas._libs.lib import NoDefault
102102
from pandas._libs.missing import NAType
103103
from pandas._libs.tslibs import BaseOffset
104104
from pandas._libs.tslibs.nattype import NaTType
105+
from pandas._libs.tslibs.offsets import DateOffset
105106
from pandas._typing import (
106107
S1,
107108
S2,
@@ -125,7 +126,6 @@ from pandas._typing import (
125126
FilePath,
126127
FillnaOptions,
127128
FloatDtypeArg,
128-
Frequency,
129129
GroupByObjectNonScalar,
130130
HashableT1,
131131
IgnoreRaise,
@@ -1131,9 +1131,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
11311131
def shift(
11321132
self,
11331133
periods: int = ...,
1134-
freq: Frequency | timedelta | None = ...,
1134+
freq: DateOffset | timedelta | None = ...,
11351135
axis: AxisIndex = ...,
1136-
fill_value: object | None = ...,
1136+
fill_value: Scalar | NAType | None = ...,
11371137
) -> UnknownSeries: ...
11381138
def info(
11391139
self,
@@ -1548,13 +1548,11 @@ class Series(IndexOpsMixin[S1], NDFrame):
15481548
) -> Series[S1]: ...
15491549
def pct_change(
15501550
self,
1551-
periods: int = 1,
1551+
periods: int = ...,
15521552
fill_method: None = ...,
1553-
limit: int | None = ...,
1554-
freq: Frequency | timedelta | None = None,
1553+
freq: DateOffset | dt.timedelta | None = ...,
15551554
*,
1556-
axis: AxisIndex = ...,
1557-
fill_value: object | None = ...,
1555+
fill_value: Scalar | NAType | None = ...,
15581556
) -> Series[S1]: ...
15591557
def first_valid_index(self) -> Scalar: ...
15601558
def last_valid_index(self) -> Scalar: ...

0 commit comments

Comments
 (0)