We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35dd15b commit 75ad42eCopy full SHA for 75ad42e
pandas/tests/indexes/datetimes/test_timezones.py
@@ -738,6 +738,28 @@ def test_dti_drop_dont_lose_tz(self):
738
739
assert ind.tz is not None
740
741
+ def test_drop_dst_boundary(self):
742
+ # see gh-18031
743
+ tz = "Europe/Brussels"
744
+ freq = "15min"
745
+
746
+ start = pd.Timestamp("201710290100", tz=tz)
747
+ end = pd.Timestamp("201710290300", tz=tz)
748
+ index = pd.date_range(start=start, end=end, freq=freq)
749
750
+ expected = DatetimeIndex(["201710290115", "201710290130",
751
+ "201710290145", "201710290200",
752
+ "201710290215", "201710290230",
753
+ "201710290245", "201710290200",
754
755
+ "201710290245", "201710290300"],
756
+ tz=tz, freq=freq,
757
+ ambiguous=[True, True, True, True,
758
+ True, True, True, False,
759
+ False, False, False, False])
760
+ result = index.drop(index[0])
761
+ tm.assert_index_equal(result, expected)
762
763
def test_date_range_localize(self):
764
rng = date_range('3/11/2012 03:00', periods=15, freq='H',
765
tz='US/Eastern')
0 commit comments