10000 BUG: Bug in setitem raising ValueError when setting more than one column via array by phofl · Pull Request #37964 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: Bug in setitem raising ValueError when setting more than one column via array #37964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add comment
  • Loading branch information
phofl committed Nov 21, 2020
commit 38daf8d6a50e026fd2cf93d90969298d9660405e
1 change: 1 addition & 0 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ def _ensure_listlike_indexer(self, key, axis=None, value=None):
if value is None:
self.obj[k] = np.nan
elif is_array_like(value) and value.ndim == 2:
# GH#37964 have to select columnwise in case of array
self.obj[k] = value[:, i]
elif is_list_like(value):
self.obj[k] = value[i]
Expand Down
0