Skip to content

Commit 6733186

Browse files
committed
Type annotations added to new function interpolate_1d_fill
1 parent f8a3423 commit 6733186

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/core/missing.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
needs_i8_conversion,
2020
)
2121
from pandas.core.dtypes.missing import isna
22+
from pandas._typing import Optional, Hashable, Dtype
2223

2324

2425
def mask_missing(arr, values_to_mask):
@@ -501,11 +502,11 @@ def _akima_interpolate(xi, yi, x, der=0, axis=0):
501502

502503
def interpolate_1d_fill(
503504
values,
504-
method="pad",
505-
limit=None,
506-
limit_area=None,
507-
fill_value=None,
508-
dtype=None,
505+
method: str = "pad",
506+
limit: Optional[int] = None,
507+
limit_area: Optional[str] = None,
508+
fill_value: Optional[Hashable] = None,
509+
dtype: Optional[Dtype] = None,
509510
):
510511
"""
511512
This is a 1D-versoin of `interpolate_2d`, which is used for methods `pad`

0 commit comments

Comments
 (0)