File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -7802,30 +7802,14 @@ def interpolate(
7802
7802
2 2.0 3.0 -3.0 9.0
7803
7803
3 2.0 4.0 -4.0 16.0
7804
7804
7805
- # Using polynomial interpolation.
7805
+ Using polynomial interpolation.
7806
7806
7807
7807
>>> df["d"].interpolate(method="polynomial", order=2)
7808
7808
0 1.0
7809
7809
1 4.0
7810
7810
2 9.0
7811
7811
3 16.0
7812
7812
Name: d, dtype: float64
7813
- # Using index method for linear interpolation with
7814
- # non-sequential index.
7815
- >>> data_non_seq = {"val": [1, np.nan, 3]}
7816
- >>> df_non_seq = pd.DataFrame(
7817
- ... data, index=[0, 1, 6]
7818
- ... ) # a non-sequential index to demonstrate the difference
7819
- >>> df_non_seq
7820
- val
7821
- 0 1.0
7822
- 1 NaN
7823
- 6 3.0
7824
- >>> df_non_seq["val"].interpolate(method="index").round(1)
7825
- 0 1.0
7826
- 1 1.3
7827
- 6 3.0
7828
- Name: val, dtype: float64
7829
7813
"""
7830
7814
inplace = validate_bool_kwarg (inplace , "inplace" )
7831
7815
You can’t perform that action at this time.
0 commit comments