Skip to content

Commit b5a6648

Browse files
author
VibavariG
committed
BUG: Fix columns param reorder issue - if columns!=None, use passed param (pandas-dev#59717)
1 parent 0d2505d commit b5a6648

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/internals/construction.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ def to_arrays(
750750

751751
elif isinstance(data, np.ndarray) and data.dtype.names is not None:
752752
# e.g. recarray
753-
columns = Index(list(data.dtype.names))
753+
if columns is None:
754+
columns = Index(list(data.dtype.names))
754755
arrays = [data[k] for k in columns]
755756
return arrays, columns
756757

0 commit comments

Comments
 (0)