File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1346,3 +1346,17 @@ def test_frequency_is_original(self, num_cols):
13461346 df = DataFrame (1 , index = index , columns = range (num_cols ))
13471347 df .apply (lambda x : x )
13481348 assert index .freq == original .freq
1349+
1350+ def test_apply_datetime_tz_issue (self ):
1351+ # GH 29052
1352+
1353+ timestamps = [
1354+ pd .Timestamp ("2019-03-15 12:34:31.909000+0000" , tz = "UTC" ),
1355+ pd .Timestamp ("2019-03-15 12:34:34.359000+0000" , tz = "UTC" ),
1356+ pd .Timestamp ("2019-03-15 12:34:34.660000+0000" , tz = "UTC" ),
1357+ ]
1358+ df = DataFrame (data = [0 , 1 , 2 ], index = timestamps )
1359+ result = df .apply (lambda x : x .name , axis = 1 )
1360+ expected = pd .Series (index = timestamps , data = timestamps )
1361+
1362+ tm .assert_series_equal (result , expected )
You can’t perform that action at this time.
0 commit comments