插值方法"cubicspline"和"from_divivations"做什么



panda插值纪录片已经为所有其他注释留下了有用的注释,说明它们是使用实际的数字索引还是时间索引进行插值。

method str, default ‘linear’
Interpolation technique to use. One of:
‘linear’: Ignore the index and treat the values as equally spaced. This is the only method supported on MultiIndexes.
‘time’: Works on daily and higher resolution data to interpolate given length of interval.
‘index’, ‘values’: use the actual numerical values of the index.
‘pad’: Fill in NaNs using existing values.
‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘spline’, ‘barycentric’, ‘polynomial’: Passed to scipy.interpolate.interp1d. These methods use the numerical values of the index. Both ‘polynomial’ and ‘spline’ require that you also specify an order (int), e.g. df.interpolate(method='polynomial', order=5).
‘krogh’, ‘piecewise_polynomial’, ‘spline’, ‘pchip’, ‘akima’, ‘cubicspline’: Wrappers around the SciPy interpolation methods of similar names. See Notes.
‘from_derivatives’: Refers to scipy.interpolate.BPoly.from_derivatives which replaces ‘piecewise_polynomial’ interpolation method in scipy 0.18.

但不幸的是,我找不到最后两个的信息:

cubicspline 
and
from_derivatives

scipy.interpolate.CubicSpline

用两次连续可微的分段三次多项式插值数据。结果表示为具有与给定数据匹配的断点的PPoly实例。

scipy.interpolate.BPoly.from_derivates

在Bernstein基上构造一个分段多项式,与指定的值和断点处的导数兼容。

最新更新