@@ -1345,10 +1345,7 @@ class Timestamp(_Timestamp):
1345
1345
@classmethod
1346
1346
def fromordinal (cls , ordinal , freq = None , tz = None ):
1347
1347
"""
1348
- Timestamp.fromordinal(ordinal, freq=None, tz=None)
1349
-
1350
- Passed an ordinal, translate and convert to a ts.
1351
- Note: by definition there cannot be any tz info on the ordinal itself.
1348
+ Construct a timestamp from a a proleptic Gregorian ordinal.
1352
1349
1353
1350
Parameters
1354
1351
----------
@@ -1359,6 +1356,10 @@ class Timestamp(_Timestamp):
1359
1356
tz : str, pytz.timezone, dateutil.tz.tzfile or None
1360
1357
Time zone for the Timestamp.
1361
1358
1359
+ Notes
1360
+ -----
1361
+ By definition there cannot be any tz info on the ordinal itself.
1362
+
1362
1363
Examples
1363
1364
--------
1364
1365
>>> pd.Timestamp.fromordinal(737425)
@@ -1370,10 +1371,7 @@ class Timestamp(_Timestamp):
1370
1371
@classmethod
1371
1372
def now (cls , tz = None ):
1372
1373
"""
1373
- Timestamp.now(tz=None)
1374
-
1375
- Return new Timestamp object representing current time local to
1376
- tz.
1374
+ Return new Timestamp object representing current time local to tz.
1377
1375
1378
1376
Parameters
1379
1377
----------
@@ -1397,10 +1395,9 @@ class Timestamp(_Timestamp):
1397
1395
@classmethod
1398
1396
def today (cls , tz = None ):
1399
1397
"""
1400
- Timestamp.today(cls, tz=None)
1398
+ Return the current time in the local timezone.
1401
1399
1402
- Return the current time in the local timezone. This differs
1403
- from datetime.today() in that it can be localized to a
1400
+ This differs from datetime.today() in that it can be localized to a
1404
1401
passed timezone.
1405
1402
1406
1403
Parameters
@@ -1477,10 +1474,7 @@ class Timestamp(_Timestamp):
1477
1474
1478
1475
def strftime (self , format ):
1479
1476
"""
1480
- Timestamp.strftime(format)
1481
-
1482
- Return a string representing the given POSIX timestamp
1483
- controlled by an explicit format string.
1477
+ Return a formatted string of the Timestamp.
1484
1478
1485
1479
Parameters
1486
1480
----------
@@ -2052,7 +2046,9 @@ timedelta}, default 'raise'
2052
2046
2053
2047
def tz_localize (self , tz , ambiguous = ' raise' , nonexistent = ' raise' ):
2054
2048
"""
2055
- Convert naive Timestamp to local time zone, or remove
2049
+ Localize the Timestamp to a timezone.
2050
+
2051
+ Convert naive Timestamp to local time zone or remove
2056
2052
timezone from timezone-aware Timestamp.
2057
2053
2058
2054
Parameters
@@ -2343,6 +2339,7 @@ default 'raise'
2343
2339
def to_julian_date (self ) -> np.float64:
2344
2340
"""
2345
2341
Convert TimeStamp to a Julian Date.
2342
+
2346
2343
0 Julian date is noon January 1, 4713 BC.
2347
2344
2348
2345
Examples
@@ -2374,6 +2371,7 @@ default 'raise'
2374
2371
def isoweekday(self ):
2375
2372
"""
2376
2373
Return the day of the week represented by the date.
2374
+
2377
2375
Monday == 1 ... Sunday == 7.
2378
2376
"""
2379
2377
# same as super().isoweekday(), but that breaks because of how
@@ -2383,6 +2381,7 @@ default 'raise'
2383
2381
def weekday (self ):
2384
2382
"""
2385
2383
Return the day of the week represented by the date.
2384
+
2386
2385
Monday == 0 ... Sunday == 6.
2387
2386
"""
2388
2387
# same as super().weekday(), but that breaks because of how
0 commit comments