私は2つのデータポイントを持っているx
とy
:
x = 5 (value corresponding to 95%)
y = 17 (value corresponding to 102.5%)
いいえxi
、100%に相当する値を計算したいと思います。
x = 5 (value corresponding to 95%)
xi = ?? (value corresponding to 100%)
y = 17 (value corresponding to 102.5%)
Pythonを使用してこれをどのように行う必要がありますか?
それはあなたが望むものですか?
In [145]: s = pd.Series([5, np.nan, 17], index=[95, 100, 102.5])
In [146]: s
Out[146]:
95.0 5.0
100.0 NaN
102.5 17.0
dtype: float64
In [147]: s.interpolate(method='index')
Out[147]:
95.0 5.0
100.0 13.0
102.5 17.0
dtype: float64
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加