File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ from pandas import (
15
15
from typing_extensions import TypeAlias
16
16
17
17
from pandas ._libs .tslibs import NaTType
18
- from pandas ._libs .tslibs .offsets import BaseOffset
18
+ from pandas ._libs .tslibs .offsets import (
19
+ BaseOffset ,
20
+ DateOffset ,
21
+ )
19
22
from pandas ._libs .tslibs .timestamps import Timestamp
20
23
from pandas ._typing import (
21
24
Frequency ,
@@ -233,6 +236,6 @@ class Period(PeriodMixin):
233
236
def strftime (self , fmt : str ) -> str : ...
234
237
def to_timestamp (
235
238
self ,
236
- freq : Frequency | None = ...,
239
+ freq : str | DateOffset | None = ...,
237
240
how : _PeriodToTimestampHow = "S" ,
238
241
) -> Timestamp : ...
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ from pandas.core.arrays.datetimelike import (
6
6
)
7
7
8
8
from pandas ._libs .tslibs import Timestamp
9
+ from pandas ._libs .tslibs .offsets import DateOffset
9
10
from pandas ._libs .tslibs .period import Period
10
11
11
12
class PeriodArray (DatetimeLikeArrayMixin , DatelikeOps ):
@@ -37,6 +38,8 @@ class PeriodArray(DatetimeLikeArrayMixin, DatelikeOps):
37
38
def start_time (self ) -> Timestamp : ...
38
39
@property
39
40
def end_time (self ) -> Timestamp : ...
40
- def to_timestamp (self , freq : str | None = ..., how : str = ...) -> Timestamp : ...
41
+ def to_timestamp (
42
+ self , freq : str | DateOffset | None = None , how : str = ...
43
+ ) -> Timestamp : ...
41
44
def asfreq (self , freq : str | None = ..., how : str = "E" ) -> Period : ...
42
45
def astype (self , dtype , copy : bool = True ): ...
Original file line number Diff line number Diff line change @@ -1237,7 +1237,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
1237
1237
) -> Series [S1 ]: ...
1238
1238
def to_timestamp (
1239
1239
self ,
1240
- freq : Frequency | None = None ,
1240
+ freq : str | DateOffset | None = None ,
1241
1241
how : ToTimestampHow = "start" ,
1242
1242
copy : _bool = True ,
1243
1243
) -> Series [S1 ]: ...
You can’t perform that action at this time.
0 commit comments