Skip to content

Commit 3486e69

Browse files
committed
Use simple_new in _new_DatetimeIndex
1 parent 43a52fc commit 3486e69

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/core/indexes/datetimes.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ def _new_DatetimeIndex(cls, d):
4949
# so need to localize
5050
tz = d.pop('tz', None)
5151

52-
with warnings.catch_warnings():
53-
# we ignore warnings from passing verify_integrity=False
54-
# TODO: If we knew what was going in to **d, we might be able to
55-
# go through _simple_new instead
56-
warnings.simplefilter("ignore")
57-
result = cls.__new__(cls, verify_integrity=False, **d)
52+
values = d.pop('data')
53+
result = cls._simple_new(values, **d)
5854

5955
if tz is not None:
6056
result = result.tz_localize('UTC').tz_convert(tz)

0 commit comments

Comments
 (0)