Skip to content

Commit 8ffbd43

Browse files
committed
modified nat.now to matchtimestamp.now
1 parent e33302f commit 8ffbd43

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

pandas/_libs/tslibs/nattype.pyx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,34 @@ class NaTType(_NaT):
12881288
12891289
12901290
Analogous for ``pd.NaT``:
1291+
"""
1292+
Return new Timestamp object representing current time local to tz.
1293+
1294+
This method returns a new `Timestamp` object that represents the current time.
1295+
If a timezone is provided, the current time will be localized to that timezone.
1296+
Otherwise, it returns the current local time.
1297+
1298+
Parameters
1299+
----------
1300+
tz : str or timezone object, default None
1301+
Timezone to localize to.
1302+
1303+
See Also
1304+
--------
1305+
to_datetime : Convert argument to datetime.
1306+
Timestamp.utcnow : Return a new Timestamp representing UTC day and time.
1307+
Timestamp.today : Return the current time in the local timezone.
12911308

1309+
Examples
1310+
--------
1311+
>>> pd.Timestamp.now() # doctest: +SKIP
1312+
Timestamp('2020-11-16 22:06:16.378782')
1313+
1314+
Analogous for ``pd.NaT``:
1315+
1316+
>>> pd.NaT.now()
1317+
NaT
1318+
"""
12921319
>>> pd.NaT.now()
12931320
NaT
12941321
""",

0 commit comments

Comments
 (0)