Skip to content

Commit a941c03

Browse files
Fix NaT docstrings
1 parent ada20a5 commit a941c03

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

pandas/_libs/tslibs/nattype.pyx

+28
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ cdef class _NaT(datetime):
251251
The copy parameter is available here only for compatibility. Its value
252252
will not affect the return value.
253253

254+
Parameters
255+
----------
256+
dtype : numpy.dtype, default None
257+
Must be None. Otherwise, a ValueError is raised.
258+
copy : bool, default False
259+
Must be False. Otherwise, a ValueError is raised.
260+
254261
Returns
255262
-------
256263
numpy.datetime64 or numpy.timedelta64
@@ -1456,23 +1463,44 @@ default 'raise'
14561463
"""
14571464
Implements datetime.replace, handles nanoseconds.
14581465
1466+
Returns a new timestamp with the same attributes,
1467+
except for those given new value.
1468+
14591469
Parameters
14601470
----------
14611471
year : int, optional
1472+
New year value.
14621473
month : int, optional
1474+
New month value.
14631475
day : int, optional
1476+
New day value.
14641477
hour : int, optional
1478+
New hour value.
14651479
minute : int, optional
1480+
New minute value.
14661481
second : int, optional
1482+
New second value.
14671483
microsecond : int, optional
1484+
New microsecond value.
14681485
nanosecond : int, optional
1486+
New nanosecond value.
14691487
tzinfo : tz-convertible, optional
1488+
New tzinfo value.
14701489
fold : int, optional
1490+
New fold value.
14711491
14721492
Returns
14731493
-------
14741494
Timestamp with fields replaced
14751495
1496+
See Also
1497+
--------
1498+
Timestamp.normalize : Normalize the Timestamp to midnight,
1499+
preserving tz information.
1500+
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
1501+
Timestamp.tz_localize : Localize the Timestamp to a timezone.
1502+
datetime.datetime.replace : Return a new datetime with replaced attributes.
1503+
14761504
Examples
14771505
--------
14781506
Create a timestamp object:

0 commit comments

Comments
 (0)