Skip to content

Commit 78b1893

Browse files
anishkarkianishkarki
authored andcommitted
DOC: Fix rounding in DataFrame.interpolate index method example
1 parent a8b2b66 commit 78b1893

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/generic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7817,11 +7817,11 @@ def interpolate(
78177817
0 1.0
78187818
1 2.0
78197819
6 3.0
7820-
>>> df.interpolate(method="index")
7821-
val
7822-
0 1.000000
7823-
1 1.333333
7824-
6 3.000000
7820+
>>> df.interpolate(method="index").round(1)
7821+
val
7822+
0 1.0
7823+
1 1.3
7824+
6 3.0
78257825
Using polynomial interpolation.
78267826
78277827
>>> df["d"].interpolate(method="polynomial", order=2)

0 commit comments

Comments
 (0)