Skip to content

Commit

Permalink
PERF-modin-project#7123: Preserve shape_hint for dropna (modin-projec…
Browse files Browse the repository at this point in the history
…t#7124)

Signed-off-by: Iaroslav Igoshev <iaroslav.igoshev@intel.com>
  • Loading branch information
YarShev authored Mar 26, 2024
1 parent 9055fd7 commit a616e4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modin/core/storage_formats/pandas/query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3005,13 +3005,14 @@ def reduce(df: pandas.DataFrame, mask: pandas.DataFrame):
copartition=False,
labels="drop",
)
return self.__constructor__(result)
return self.__constructor__(result, shape_hint=self._shape_hint)

return self.__constructor__(
self._modin_frame.filter(
kwargs.get("axis", 0) ^ 1,
lambda df: pandas.DataFrame.dropna(df, **kwargs),
)
),
shape_hint=self._shape_hint,
)

def drop(self, index=None, columns=None, errors: str = "raise"):
Expand Down

0 comments on commit a616e4c

Please sign in to comment.