We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a62136 commit 0d6efa0Copy full SHA for 0d6efa0
pandas/tests/scalar/timestamp/methods/test_replace.py
@@ -195,7 +195,11 @@ def test_replace_unit(self):
195
ts = Timestamp("2023-07-15 23:08:12")
196
ts1 = Timestamp("2023-07-15 23:08:12.134567")
197
ts2 = Timestamp("2023-07-15 23:08:12.134567123")
198
+ ts = ts.replace(microsecond=999)
199
+ assert ts.unit == "ms"
200
ts = ts.replace(microsecond=ts1.microsecond)
201
+ assert ts.unit == "us"
202
assert ts == ts1
203
ts = ts.replace(nanosecond=ts2.nanosecond)
204
+ assert ts.unit == "ns"
205
assert ts == ts2
0 commit comments