@@ -307,6 +307,28 @@ def test_drop_duplicates_metadata(self):
307
307
tm .assert_index_equal (idx , result )
308
308
assert result .freq is None
309
309
310
+ def test_drop_dst_boundary (self ):
311
+ # see gh-18031
312
+ tz = "Europe/Brussels"
313
+ freq = "15min"
314
+
315
+ start = pd .Timestamp ("201710290100" , tz = tz )
316
+ end = pd .Timestamp ("201710290300" , tz = tz )
317
+ index = pd .date_range (start = start , end = end , freq = freq )
318
+
319
+ expected = DatetimeIndex (["201710290115" , "201710290130" ,
320
+ "201710290145" , "201710290200" ,
321
+ "201710290215" , "201710290230" ,
322
+ "201710290245" , "201710290200" ,
323
+ "201710290215" , "201710290230" ,
324
+ "201710290245" , "201710290300" ],
325
+ tz = tz , freq = freq ,
326
+ ambiguous = [True , True , True , True ,
327
+ True , True , True , False ,
328
+ False , False , False , False ])
329
+ result = index .drop (index [0 ])
330
+ tm .assert_index_equal (result , expected )
331
+
310
332
def test_drop_duplicates (self ):
311
333
# to check Index/Series compat
312
334
base = pd .date_range ('2011-01-01' , '2011-01-31' , freq = 'D' , name = 'idx' )
0 commit comments