Skip to content

Commit fc8d55d

Browse files
authored
fix testcase issue (copy)
1 parent b7ab155 commit fc8d55d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/construction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ def sanitize_array(
615615
if data.ndim != 1:
616616
# GH#61026
617617
subarr = data.ravel()
618+
if copy:
619+
subarr = subarr.copy()
618620
subarr = maybe_infer_to_datetimelike(subarr)
619621
elif data.dtype.kind == "U" and using_string_dtype():
620622
from pandas.core.arrays.string_ import StringDtype

0 commit comments

Comments
 (0)