@@ -2117,6 +2117,7 @@ def test_reset_index_datetime(self):
2117
2117
'a' : np .arange (5 ,dtype = 'int64' ), 'b' : ['A' , 'B' , 'C' , 'D' , 'E' ]},
2118
2118
columns = ['idx1' , 'idx2' , 'a' , 'b' ])
2119
2119
expected ['idx1' ] = expected ['idx1' ].apply (lambda d : pd .Timestamp (d , tz = tz ))
2120
+
2120
2121
assert_frame_equal (df .reset_index (), expected )
2121
2122
2122
2123
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):
2142
2143
2143
2144
# GH 7793
2144
2145
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 )
2146
2147
2147
2148
expected = pd .DataFrame ({'level_0' : 'a a a b b b' .split (),
2148
2149
'level_1' : [datetime .datetime (2013 , 1 , 1 ),
@@ -2158,7 +2159,7 @@ def test_reset_index_period(self):
2158
2159
idx = pd .MultiIndex .from_product ([pd .period_range ('20130101' , periods = 3 , freq = 'M' ),
2159
2160
['a' ,'b' ,'c' ]], names = ['month' , 'feature' ])
2160
2161
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' ])
2162
2163
expected = pd .DataFrame ({'month' : [pd .Period ('2013-01' , freq = 'M' )] * 3 +
2163
2164
[pd .Period ('2013-02' , freq = 'M' )] * 3 +
2164
2165
[pd .Period ('2013-03' , freq = 'M' )] * 3 ,
0 commit comments