Skip to content

Commit 1bfd52a

Browse files
committed
restore DateOffset
1 parent 83dd9c5 commit 1bfd52a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
16841684
) -> Self: ...
16851685
def to_timestamp(
16861686
self,
1687-
freq: Frequency | None = None,
1687+
freq: str | DateOffset | None = None,
16881688
how: ToTimestampHow = ...,
16891689
axis: Axis = 0,
16901690
copy: _bool = True,

pandas-stubs/core/indexes/accessors.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ from typing_extensions import Never
3434

3535
from pandas._libs.interval import Interval
3636
from pandas._libs.tslibs import BaseOffset
37+
from pandas._libs.tslibs.offsets import DateOffset
3738
from pandas._libs.tslibs.period import Period
3839
from pandas._libs.tslibs.timedeltas import Timedelta
3940
from pandas._libs.tslibs.timestamps import Timestamp
@@ -355,12 +356,12 @@ class _PeriodProperties(
355356
def strftime(self, date_format: str) -> _PeriodStrReturnTypes: ...
356357
def to_timestamp(
357358
self,
358-
freq: Frequency | None = ...,
359+
freq: str | DateOffset | None = ...,
359360
how: TimestampConvention = ...,
360361
) -> _PeriodDTAReturnTypes: ...
361362
def asfreq(
362363
self,
363-
freq: Frequency | None = ...,
364+
freq: str | DateOffset | None = ...,
364365
how: Literal["E", "END", "FINISH", "S", "START", "BEGIN"] = ...,
365366
) -> _PeriodPAReturnTypes: ...
366367

0 commit comments

Comments
 (0)