arkouda
arkouda copied to clipboard
Series.fillna for dict
The following example:
data = ak.Series([1, np.nan, 3, np.nan, 5])
fill_values = {1: 10, 3: 20} # Dictionary with keys as index positions and values as fill values
filled_series = data.fillna(fill_values)
should output : Filled Series: 0 1.0 1 10.0 2 3.0 3 20.0 4 5.0
This depends on Series.map working when NaN values are in the index.