83
83
if TYPE_CHECKING :
84
84
from typing import Literal
85
85
86
+ from pandas import DataFrame
86
87
from pandas .core .arrays import (
87
88
PeriodArray ,
88
89
TimedeltaArray ,
@@ -1256,7 +1257,7 @@ def day_name(self, locale=None):
1256
1257
return result
1257
1258
1258
1259
@property
1259
- def time (self ):
1260
+ def time (self ) -> np . ndarray :
1260
1261
"""
1261
1262
Returns numpy array of datetime.time. The time part of the Timestamps.
1262
1263
"""
@@ -1268,15 +1269,15 @@ def time(self):
1268
1269
return ints_to_pydatetime (timestamps , box = "time" )
1269
1270
1270
1271
@property
1271
- def timetz (self ):
1272
+ def timetz (self ) -> np . ndarray :
1272
1273
"""
1273
1274
Returns numpy array of datetime.time also containing timezone
1274
1275
information. The time part of the Timestamps.
1275
1276
"""
1276
1277
return ints_to_pydatetime (self .asi8 , self .tz , box = "time" )
1277
1278
1278
1279
@property
1279
- def date (self ):
1280
+ def date (self ) -> np . ndarray :
1280
1281
"""
1281
1282
Returns numpy array of python datetime.date objects (namely, the date
1282
1283
part of Timestamps without timezone information).
@@ -1288,7 +1289,7 @@ def date(self):
1288
1289
1289
1290
return ints_to_pydatetime (timestamps , box = "date" )
1290
1291
1291
- def isocalendar (self ):
1292
+ def isocalendar (self ) -> DataFrame :
1292
1293
"""
1293
1294
Returns a DataFrame with the year, week, and day calculated according to
1294
1295
the ISO 8601 standard.
@@ -1871,7 +1872,7 @@ def weekofyear(self):
1871
1872
""" ,
1872
1873
)
1873
1874
1874
- def to_julian_date (self ):
1875
+ def to_julian_date (self ) -> np . ndarray :
1875
1876
"""
1876
1877
Convert Datetime Array to float64 ndarray of Julian Dates.
1877
1878
0 Julian date is noon January 1, 4713 BC.
0 commit comments