diff --git a/modin/pandas/series.py b/modin/pandas/series.py index c773ad8ecab..0a3449cfc90 100644 --- a/modin/pandas/series.py +++ b/modin/pandas/series.py @@ -1266,6 +1266,14 @@ def map(self, arg, na_action=None): # noqa: PR01, RT01, D200 """ Map values of Series according to input correspondence. """ + if isinstance(arg, type(self)): + # HACK: if we don't cast to pandas, then the execution engine will try to + # propagate the distributed Series to workers and most likely would have + # some performance problems. + # TODO: A better way of doing so could be passing this `arg` as a query compiler + # and broadcast accordingly. + arg = arg._to_pandas() + if not callable(arg) and hasattr(arg, "get"): mapper = arg