Skip to content

Commit

Permalink
address failures
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Krishna <naren.krishna@snowflake.com>
  • Loading branch information
sfc-gh-nkrishna committed Oct 2, 2024
1 parent 4526d86 commit df5113e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12402,7 +12402,7 @@ def resample(
frame = fill_missing_resample_bins_for_frame(
qc._modin_frame, rule, start_date, end_date
)
if resample_method in ("sum", "count", "size"):
if resample_method in ("sum", "count", "size", "nunique"):
values_arg: Union[int, dict]
if resample_method == "sum":
# For sum(), we need to fill NaN values as Timedelta(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,13 @@ def count(self) -> Union[pd.DataFrame, pd.Series]:

def nunique(self, *args: Any, **kwargs: Any) -> pd.Series:
# TODO: SNOW-1063368: Modin upgrade - modin.pandas.resample.Resample
is_series = not self._dataframe._is_dataframe

return self._dataframe.__constructor__(
query_compiler=self._query_compiler.resample(
self.resample_kwargs,
"nunique",
tuple(),
dict(),
is_series,
True,
)
)

Expand Down Expand Up @@ -621,14 +619,12 @@ def quantile(
) -> Union[pd.DataFrame, pd.Series]:
# TODO: SNOW-1063368: Modin upgrade - modin.pandas.resample.Resample
agg_kwargs = dict(q=q)
is_series = not self._dataframe._is_dataframe

return self._dataframe.__constructor__(
query_compiler=self._query_compiler.resample(
self.resample_kwargs,
"quantile",
tuple(),
agg_kwargs,
is_series,
False,
)
)

0 comments on commit df5113e

Please sign in to comment.