We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3396dca commit 334b4dbCopy full SHA for 334b4db
pandas/tseries/tests/test_period.py
@@ -1298,6 +1298,14 @@ def test_to_timestamp_preserve_name(self):
1298
conv = index.to_timestamp('D')
1299
self.assertEquals(conv.name, 'foo')
1300
1301
+ def test_to_timestamp_repr_is_code(self):
1302
+ zs=[Timestamp('99-04-17 00:00:00',tz='UTC'),
1303
+ Timestamp('2001-04-17 00:00:00',tz='UTC'),
1304
+ Timestamp('2001-04-17 00:00:00',tz='America/Los_Angeles'),
1305
+ Timestamp('2001-04-17 00:00:00',tz=None)]
1306
+ for z in zs:
1307
+ self.assertEquals( eval(repr(z)), z)
1308
+
1309
def test_as_frame_columns(self):
1310
rng = period_range('1/1/2000', periods=5)
1311
df = DataFrame(randn(10, 5), columns=rng)
0 commit comments