Skip to content

Commit 1895062

Browse files
authored
DOC: fix examples in Timestamp functions (#44702)
* DOC: fix examples in Timestamp functions `Timestamp.utcfromtimestamp()` and `Timestamp.fromtimestamp()` * DOC: fix examples in Timestamp functions `Timestamp.utcfromtimestamp()` and `Timestamp.fromtimestamp()`
1 parent 45f0705 commit 1895062

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/_libs/tslibs/nattype.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class NaTType(_NaT):
553553
554554
Examples
555555
--------
556-
>>> pd.Timestamp.fromtimestamp(1584199972)
556+
>>> pd.Timestamp.utcfromtimestamp(1584199972)
557557
Timestamp('2020-03-14 15:32:52')
558558
""",
559559
)
@@ -566,7 +566,7 @@ class NaTType(_NaT):
566566
567567
Examples
568568
--------
569-
>>> pd.Timestamp.utcfromtimestamp(1584199972)
569+
>>> pd.Timestamp.fromtimestamp(1584199972)
570570
Timestamp('2020-03-14 15:32:52')
571571
572572
Note that the output may change depending on your local time.

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ class Timestamp(_Timestamp):
11621162
11631163
Examples
11641164
--------
1165-
>>> pd.Timestamp.fromtimestamp(1584199972)
1165+
>>> pd.Timestamp.utcfromtimestamp(1584199972)
11661166
Timestamp('2020-03-14 15:32:52')
11671167
"""
11681168
return cls(datetime.utcfromtimestamp(ts))
@@ -1176,7 +1176,7 @@ class Timestamp(_Timestamp):
11761176
11771177
Examples
11781178
--------
1179-
>>> pd.Timestamp.utcfromtimestamp(1584199972)
1179+
>>> pd.Timestamp.fromtimestamp(1584199972)
11801180
Timestamp('2020-03-14 15:32:52')
11811181
11821182
Note that the output may change depending on your local time.

0 commit comments

Comments
 (0)