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 committed May 14, 2024
1 parent 8a47789 commit e2e8fcb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modin/core/dataframe/pandas/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2337,13 +2337,11 @@ def fold(self, axis, func, new_index=None, new_columns=None):
copy_lengths = True
copy_widths = True
if new_index is not None:
if self.has_materialized_index and not len(self.index) == len(new_index):
if self.has_materialized_index and len(self.index) != len(new_index):
copy_lengths = False
self.set_index_cache(new_index)
if new_columns is not None:
if self.has_materialized_columns and not len(self.columns) == len(
new_columns
):
if self.has_materialized_columns and len(self.columns) != len(new_columns):
copy_widths = False
self.set_columns_cache(new_columns)

Expand Down

0 comments on commit e2e8fcb

Please sign in to comment.