Skip to content

Commit 757e34e

Browse files
authored
remove deprecated downcast argument (#1127)
* remove deprecated `downcast` argument * in fact, we can remove fillna from generic, right? * remove downcast from index.fillna, remove multiindex.fillna
1 parent aa9844d commit 757e34e

File tree

7 files changed

+2
-42
lines changed

7 files changed

+2
-42
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
785785
*,
786786
axis: Axis | None = ...,
787787
limit: int = ...,
788-
downcast: dict | None = ...,
789788
inplace: Literal[True],
790789
) -> None: ...
791790
@overload
@@ -795,7 +794,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
795794
*,
796795
axis: Axis | None = ...,
797796
limit: int = ...,
798-
downcast: dict | None = ...,
799797
inplace: Literal[False] = ...,
800798
) -> Self: ...
801799
@overload
@@ -1719,7 +1717,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
17191717
inplace: Literal[True],
17201718
limit: int | None = ...,
17211719
limit_area: Literal["inside", "outside"] | None = ...,
1722-
downcast: dict | None = ...,
17231720
) -> None: ...
17241721
@overload
17251722
def bfill(
@@ -1729,7 +1726,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
17291726
inplace: Literal[False] = ...,
17301727
limit: int | None = ...,
17311728
limit_area: Literal["inside", "outside"] | None = ...,
1732-
downcast: dict | None = ...,
17331729
) -> Self: ...
17341730
@overload
17351731
def clip(
@@ -1812,7 +1808,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18121808
inplace: Literal[True],
18131809
limit: int | None = ...,
18141810
limit_area: Literal["inside", "outside"] | None = ...,
1815-
downcast: dict | None = ...,
18161811
) -> None: ...
18171812
@overload
18181813
def ffill(
@@ -1822,7 +1817,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18221817
inplace: Literal[False] = ...,
18231818
limit: int | None = ...,
18241819
limit_area: Literal["inside", "outside"] | None = ...,
1825-
downcast: dict | None = ...,
18261820
) -> Self: ...
18271821
def filter(
18281822
self,
@@ -1864,7 +1858,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18641858
limit: int | None = ...,
18651859
limit_direction: Literal["forward", "backward", "both"] = ...,
18661860
limit_area: Literal["inside", "outside"] | None = ...,
1867-
downcast: Literal["infer"] | None = ...,
18681861
inplace: Literal[True],
18691862
**kwargs,
18701863
) -> None: ...
@@ -1877,7 +1870,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18771870
limit: int | None = ...,
18781871
limit_direction: Literal["forward", "backward", "both"] = ...,
18791872
limit_area: Literal["inside", "outside"] | None = ...,
1880-
downcast: Literal["infer"] | None = ...,
18811873
inplace: Literal[False] = ...,
18821874
**kwargs,
18831875
) -> Self: ...

pandas-stubs/core/generic.pyi

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -437,26 +437,6 @@ class NDFrame(indexing.IndexingMixin):
437437
dtype_backend: DtypeBackend = ...,
438438
) -> Self: ...
439439
@overload
440-
def fillna(
441-
self,
442-
value=...,
443-
*,
444-
axis=...,
445-
inplace: Literal[True],
446-
limit=...,
447-
downcast=...,
448-
) -> None: ...
449-
@overload
450-
def fillna(
451-
self,
452-
value=...,
453-
*,
454-
axis=...,
455-
inplace: Literal[False] = ...,
456-
limit=...,
457-
downcast=...,
458-
) -> NDFrame: ...
459-
@overload
460440
def replace(
461441
self,
462442
to_replace=...,

pandas-stubs/core/indexes/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class Index(IndexOpsMixin[S1]):
321321
isnull = ...
322322
def notna(self): ...
323323
notnull = ...
324-
def fillna(self, value=..., downcast=...): ...
324+
def fillna(self, value=...): ...
325325
def dropna(self, how: Literal["any", "all"] = ...) -> Self: ...
326326
def unique(self, level=...) -> Self: ...
327327
def drop_duplicates(self, *, keep: NaPosition | Literal[False] = ...) -> Self: ...

pandas-stubs/core/indexes/category.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CategoricalIndex(ExtensionIndex[S1], accessor.PandasDelegate):
3535
def __contains__(self, key) -> bool: ...
3636
def __array__(self, dtype=...) -> np.ndarray: ...
3737
def astype(self, dtype: DtypeArg, copy: bool = ...) -> Index: ...
38-
def fillna(self, value=..., downcast=...): ...
38+
def fillna(self, value=...): ...
3939
@property
4040
def is_unique(self) -> bool: ...
4141
@property

pandas-stubs/core/indexes/multi.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class MultiIndex(Index[Any]):
103103
@property
104104
def is_monotonic_decreasing(self) -> bool: ...
105105
def duplicated(self, keep: Literal["first", "last", False] = ...): ...
106-
def fillna(self, value=..., downcast=...) -> None: ...
107106
def dropna(self, how: Literal["any", "all"] = ...) -> Self: ...
108107
def get_level_values(self, level: str | int) -> Index: ...
109108
def unique(self, level=...): ...

pandas-stubs/core/resample.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ from typing_extensions import (
2727
TypeAlias,
2828
)
2929

30-
from pandas._libs.lib import NoDefault
3130
from pandas._typing import (
3231
S1,
3332
Axis,
@@ -105,7 +104,6 @@ class Resampler(BaseGroupBy[NDFrameT]):
105104
inplace: Literal[True],
106105
limit_direction: Literal["forward", "backward", "both"] = ...,
107106
limit_area: Literal["inside", "outside"] | None = ...,
108-
downcast: Literal["infer"] | None | NoDefault = ...,
109107
**kwargs,
110108
) -> None: ...
111109
@overload
@@ -118,7 +116,6 @@ class Resampler(BaseGroupBy[NDFrameT]):
118116
inplace: Literal[False] = ...,
119117
limit_direction: Literal["forward", "backward", "both"] = ...,
120118
limit_area: Literal["inside", "outside"] | None = ...,
121-
downcast: Literal["infer"] | None | NoDefault = ...,
122119
**kwargs,
123120
) -> NDFrameT: ...
124121
def asfreq(self, fill_value: Scalar | None = ...) -> NDFrameT: ...

pandas-stubs/core/series.pyi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
10751075
*,
10761076
axis: AxisIndex = ...,
10771077
limit: int | None = ...,
1078-
downcast: dict | None = ...,
10791078
inplace: Literal[True],
10801079
) -> None: ...
10811080
@overload
@@ -1085,7 +1084,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
10851084
*,
10861085
axis: AxisIndex = ...,
10871086
limit: int | None = ...,
1088-
downcast: dict | None = ...,
10891087
inplace: Literal[False] = ...,
10901088
) -> Series[S1]: ...
10911089
@overload
@@ -1302,7 +1300,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13021300
inplace: Literal[True],
13031301
limit: int | None = ...,
13041302
limit_area: Literal["inside", "outside"] | None = ...,
1305-
downcast: dict | None = ...,
13061303
) -> None: ...
13071304
@overload
13081305
def ffill(
@@ -1312,7 +1309,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13121309
inplace: Literal[False] = ...,
13131310
limit: int | None = ...,
13141311
limit_area: Literal["inside", "outside"] | None = ...,
1315-
downcast: dict | None = ...,
13161312
) -> Series[S1]: ...
13171313
@overload
13181314
def bfill(
@@ -1322,7 +1318,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13221318
inplace: Literal[True],
13231319
limit: int | None = ...,
13241320
limit_area: Literal["inside", "outside"] | None = ...,
1325-
downcast: dict | None = ...,
13261321
) -> None: ...
13271322
@overload
13281323
def bfill(
@@ -1332,7 +1327,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13321327
inplace: Literal[False] = ...,
13331328
limit: int | None = ...,
13341329
limit_area: Literal["inside", "outside"] | None = ...,
1335-
downcast: dict | None = ...,
13361330
) -> Series[S1]: ...
13371331
@overload
13381332
def interpolate(
@@ -1344,7 +1338,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13441338
inplace: Literal[True],
13451339
limit_direction: Literal["forward", "backward", "both"] | None = ...,
13461340
limit_area: Literal["inside", "outside"] | None = ...,
1347-
downcast: Literal["infer"] | None = ...,
13481341
**kwargs,
13491342
) -> None: ...
13501343
@overload
@@ -1357,7 +1350,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
13571350
inplace: Literal[False] = ...,
13581351
limit_direction: Literal["forward", "backward", "both"] | None = ...,
13591352
limit_area: Literal["inside", "outside"] | None = ...,
1360-
downcast: Literal["infer"] | None = ...,
13611353
**kwargs,
13621354
) -> Series[S1]: ...
13631355
def asof(

0 commit comments

Comments
 (0)