From 0a5000ad904056ad315b1e5b231961ff538b1357 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Wed, 25 Nov 2020 20:58:17 +0300 Subject: [PATCH] FIX-#2374: fix setitem Signed-off-by: Anatoly Myachev --- modin/engines/base/frame/data.py | 5 ++++- modin/pandas/dataframe.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modin/engines/base/frame/data.py b/modin/engines/base/frame/data.py index 0f863c063f2..de8aef66674 100644 --- a/modin/engines/base/frame/data.py +++ b/modin/engines/base/frame/data.py @@ -1729,7 +1729,10 @@ def _copartition( ) index_other_obj = [o.axes[axis] for o in other] - joined_index = self._join_index_objects(axis, index_other_obj, how, sort) + if how == "reindex_to_self": + joined_index = self.axes[axis] + else: + joined_index = self._join_index_objects(axis, index_other_obj, how, sort) # We have to set these because otherwise when we perform the functions it may # end up serializing this entire object. diff --git a/modin/pandas/dataframe.py b/modin/pandas/dataframe.py index 9ffbb82ef55..8bb6609552f 100644 --- a/modin/pandas/dataframe.py +++ b/modin/pandas/dataframe.py @@ -1975,7 +1975,7 @@ def __setitem__(self, key, value): self._query_compiler.concat( 1, value._query_compiler, - join="left", + join="reindex_to_self", ), inplace=True, )