Skip to content

Commit 388a21a

Browse files
committed
Change data to data._values in checking condition
1 parent f0397ef commit 388a21a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/series.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,8 @@ def __init__(self, data=None, index=None, dtype=None, name=None,
181181
# astype copies
182182
data = data.astype(dtype)
183183
else:
184-
# need to copy to avoid aliasing issues
185184
# GH21907
186-
if isinstance(data, DatetimeIndex):
185+
if isinstance(data._values, DatetimeIndex):
187186
data = data.copy(deep=True)
188187
else:
189188
data = data._values.copy()

0 commit comments

Comments
 (0)