bigframes.pandas.Series.interpolate#
- Series.interpolate(method: str = 'linear') Series[source]#
Fill NaN values using an interpolation method.
Examples:
Filling in NaN in a Series via linear interpolation.
>>> s = bpd.Series([0, 1, np.nan, 3]) >>> s 0 0.0 1 1.0 2 <NA> 3 3.0 dtype: Float64
>>> s.interpolate() 0 0.0 1 1.0 2 2.0 3 3.0 dtype: Float64
- Parameters:
method (str, default 'linear') – Interpolation technique to use. Only ‘linear’ supported. ‘linear’: Ignore the index and treat the values as equally spaced. This is the only method supported on MultiIndexes. ‘index’, ‘values’: use the actual numerical values of the index. ‘pad’: Fill in NaNs using existing values. ‘nearest’, ‘zero’, ‘slinear’: Emulates scipy.interpolate.interp1d
- Returns:
Returns the same object type as the caller, interpolated at some or all
NaNvalues- Return type: