@@ -2117,6 +2117,7 @@ def test_reset_index_datetime(self):
21172117 'a' : np .arange (5 ,dtype = 'int64' ), 'b' : ['A' , 'B' , 'C' , 'D' , 'E' ]},
21182118 columns = ['idx1' , 'idx2' , 'a' , 'b' ])
21192119 expected ['idx1' ] = expected ['idx1' ].apply (lambda d : pd .Timestamp (d , tz = tz ))
2120+
21202121 assert_frame_equal (df .reset_index (), expected )
21212122
21222123 idx3 = pd .date_range ('1/1/2012' , periods = 5 , freq = 'MS' , tz = 'Europe/Paris' , name = 'idx3' )
@@ -2142,7 +2143,7 @@ def test_reset_index_datetime(self):
21422143
21432144 # GH 7793
21442145 idx = pd .MultiIndex .from_product ([['a' ,'b' ], pd .date_range ('20130101' , periods = 3 , tz = tz )])
2145- df = pd .DataFrame (np .arange (6 ).reshape (6 ,1 ), columns = ['a' ], index = idx )
2146+ df = pd .DataFrame (np .arange (6 , dtype = 'int64' ).reshape (6 ,1 ), columns = ['a' ], index = idx )
21462147
21472148 expected = pd .DataFrame ({'level_0' : 'a a a b b b' .split (),
21482149 'level_1' : [datetime .datetime (2013 , 1 , 1 ),
@@ -2158,7 +2159,7 @@ def test_reset_index_period(self):
21582159 idx = pd .MultiIndex .from_product ([pd .period_range ('20130101' , periods = 3 , freq = 'M' ),
21592160 ['a' ,'b' ,'c' ]], names = ['month' , 'feature' ])
21602161
2161- df = pd .DataFrame (np .arange (9 ).reshape (- 1 ,1 ), index = idx , columns = ['a' ])
2162+ df = pd .DataFrame (np .arange (9 , dtype = 'int64' ).reshape (- 1 ,1 ), index = idx , columns = ['a' ])
21622163 expected = pd .DataFrame ({'month' : [pd .Period ('2013-01' , freq = 'M' )] * 3 +
21632164 [pd .Period ('2013-02' , freq = 'M' )] * 3 +
21642165 [pd .Period ('2013-03' , freq = 'M' )] * 3 ,
0 commit comments