Skip to content

Commit

Permalink
Use simple_new in _new_DatetimeIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Nov 26, 2018
1 parent 43a52fc commit 3486e69
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pandas/core/indexes/datetimes.py
Expand Up @@ -49,12 +49,8 @@ def _new_DatetimeIndex(cls, d):
# so need to localize
tz = d.pop('tz', None)

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

if tz is not None:
result = result.tz_localize('UTC').tz_convert(tz)
Expand Down

0 comments on commit 3486e69

Please sign in to comment.