Skip to content

Commit 414f1d3

Browse files
committed
fix #53020
1 parent 29e5e4c commit 414f1d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/tslibs/timestamps.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ cdef class _Timestamp(ABCTimestamp):
10261026
base1, base2 = base, ""
10271027

10281028
if timespec == "nanoseconds" or (timespec == "auto" and self.nanosecond):
1029-
if self.microsecond:
1029+
if self.microsecond or timespec == "nanoseconds":
10301030
base1 += f"{self.nanosecond:03d}"
10311031
else:
10321032
base1 += f".{self.nanosecond:09d}"

0 commit comments

Comments
 (0)