@@ -1202,12 +1202,12 @@ def test_to_timestamp(self):
1202
1202
series = Series (1 , index = index , name = 'foo' )
1203
1203
1204
1204
exp_index = date_range ('1/1/2001' , end = '12/31/2009' , freq = 'A-DEC' )
1205
- result = series .to_timestamp ('D' , 'end' )
1205
+ result = series .to_timestamp (how = 'end' )
1206
1206
self .assert_ (result .index .equals (exp_index ))
1207
1207
self .assertEquals (result .name , 'foo' )
1208
1208
1209
1209
exp_index = date_range ('1/1/2001' , end = '1/1/2009' , freq = 'AS-DEC' )
1210
- result = series .to_timestamp ('D' , 'start' )
1210
+ result = series .to_timestamp (how = 'start' )
1211
1211
self .assert_ (result .index .equals (exp_index ))
1212
1212
1213
1213
@@ -1232,6 +1232,15 @@ def _get_with_delta(delta, freq='A-DEC'):
1232
1232
1233
1233
self .assertRaises (ValueError , index .to_timestamp , '5t' )
1234
1234
1235
+ index = PeriodIndex (freq = 'H' , start = '1/1/2001' , end = '1/2/2001' )
1236
+ series = Series (1 , index = index , name = 'foo' )
1237
+
1238
+ exp_index = date_range ('1/1/2001 00:59:59' , end = '1/2/2001 00:59:59' ,
1239
+ freq = 'H' )
1240
+ result = series .to_timestamp (how = 'end' )
1241
+ self .assert_ (result .index .equals (exp_index ))
1242
+ self .assertEquals (result .name , 'foo' )
1243
+
1235
1244
def test_to_timestamp_quarterly_bug (self ):
1236
1245
years = np .arange (1960 , 2000 ).repeat (4 )
1237
1246
quarters = np .tile (range (1 , 5 ), 40 )
0 commit comments