Skip to content

DEPR: Series.combine with non-Series #62918

@jbrockmendel

Description

@jbrockmendel

The code for this path is

elif [other_is_not_a_series]:
    new_index = self.index
    new_values = np.empty(len(new_index), dtype=object)
    with np.errstate(all="ignore"):
        new_values[:] = [func(lv, other) for lv in self._values]
    new_name = self.name

res_values = self.array._cast_pointwise_result(new_values)
return self._constructor(...)

AFAICT this is equivalent to series.map(lambda x: func(x, other)). (Unless maybe map hasn't been updated to use _cast_pointwise_result?). If so, we should deprecate allowing it and tell users to use map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions