Skip to content

Commit

Permalink
BUG: Fix columns param reorder issue - if columns!=None, use passed p…
Browse files Browse the repository at this point in the history
  • Loading branch information
VibavariG committed Sep 14, 2024
1 parent 0d2505d commit b5a6648
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/core/internals/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,8 @@ def to_arrays(

elif isinstance(data, np.ndarray) and data.dtype.names is not None:
# e.g. recarray
columns = Index(list(data.dtype.names))
if columns is None:
columns = Index(list(data.dtype.names))
arrays = [data[k] for k in columns]
return arrays, columns

Expand Down

0 comments on commit b5a6648

Please sign in to comment.