override_left_with_right_series
- trashpanda.override_left_with_right_series(left_target: pandas.core.series.Series, overriding_right: pandas.core.series.Series) pandas.core.series.Series
Overrides overlapping items of left with right.
- Parameters
left_target (DataFrame) – Series which should be overridden.
overriding_right (DataFrame) – The new values as Series, which overrides the left target.
- Returns
Series
Examples
>>> from pandas import Series, Int16Dtype >>> import numpy as np >>> left = Series(np.full(3, 1), index=list(iter("abc")), dtype=Int16Dtype()) >>> left a 1 b 1 c 1 dtype: Int16 >>> right = Series(np.full(2, 2), index=list(iter("ad")), dtype=Int16Dtype()) >>> right a 2 d 2 dtype: Int16 >>> override_left_with_right_series(left, right) a 2 b 1 c 1 d 2 dtype: Int16