Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Anatoly Myachev <[email protected]>
  • Loading branch information
YarShev and anmyachev authored Apr 25, 2024
1 parent 41b6170 commit 25a0aec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion modin/pandas/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,6 @@ def __setitem__(self, key, value) -> None:
to_concat.append(src_obj[to_take])

new_qc = concat(to_concat, axis=1)._query_compiler
new_qc.index = self.index
else:
new_qc = self._query_compiler.write_items(
slice(None),
Expand Down
6 changes: 4 additions & 2 deletions modin/tests/pandas/dataframe/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2177,8 +2177,10 @@ def test___setitem__(data):
df_equals(modin_df, pandas_df)

# Test df assignment to a columns selection
modin_df[modin_df.columns[[0, -1]]] = modin_df[modin_df.columns[[0, -1]]]
pandas_df[pandas_df.columns[[0, -1]]] = pandas_df[pandas_df.columns[[0, -1]]]
modin_columns = modin_df.columns[[0, -1]]
pandas_columns = pandas_df.columns[[0, -1]]
modin_df[modin_columns] = modin_df[modin_columns]
pandas_df[pandas_columns] = pandas_df[pandas_columns]
df_equals(modin_df, pandas_df)

# Test series assignment to column
Expand Down

0 comments on commit 25a0aec

Please sign in to comment.