Skip to content

Commit d3fcc64

Browse files
GH1063 Remove deprecated methods (#1064)
* GH1063 Remove deprecated methods * GH1063 Remove infer_datetime_format from read_csv and to_datetime
1 parent b6ae6e8 commit d3fcc64

File tree

4 files changed

+14
-40
lines changed

4 files changed

+14
-40
lines changed

pandas-stubs/core/resample.pyi

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -122,40 +122,22 @@ class Resampler(BaseGroupBy[NDFrameT]):
122122
**kwargs,
123123
) -> NDFrameT: ...
124124
def asfreq(self, fill_value: Scalar | None = ...) -> NDFrameT: ...
125-
def sum(
126-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
127-
) -> NDFrameT: ...
128-
def prod(
129-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
130-
) -> NDFrameT: ...
131-
def min(
132-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
133-
) -> NDFrameT: ...
134-
def max(
135-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
136-
) -> NDFrameT: ...
137-
def first(
138-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
139-
) -> NDFrameT: ...
140-
def last(
141-
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
142-
) -> NDFrameT: ...
143-
def median(self, numeric_only: bool = ..., *args, **kwargs) -> NDFrameT: ...
144-
def mean(self, numeric_only: bool = ..., *args, **kwargs) -> NDFrameT: ...
145-
def std(
146-
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
147-
) -> NDFrameT: ...
148-
def var(
149-
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
150-
) -> NDFrameT: ...
151-
def sem(
152-
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
153-
) -> NDFrameT: ...
154-
def ohlc(self, *args, **kwargs) -> DataFrame: ...
125+
def sum(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
126+
def prod(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
127+
def min(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
128+
def max(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
129+
def first(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
130+
def last(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
131+
def median(self, numeric_only: bool = ...) -> NDFrameT: ...
132+
def mean(self, numeric_only: bool = ...) -> NDFrameT: ...
133+
def std(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
134+
def var(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
135+
def sem(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
136+
def ohlc(self) -> DataFrame: ...
155137
@overload
156-
def nunique(self: Resampler[Series], *args, **kwargs) -> Series[int]: ...
138+
def nunique(self: Resampler[Series]) -> Series[int]: ...
157139
@overload
158-
def nunique(self: Resampler[DataFrame], *args, **kwargs) -> DataFrame: ...
140+
def nunique(self: Resampler[DataFrame]) -> DataFrame: ...
159141
def size(self) -> Series[int]: ...
160142
@overload
161143
def count(self: Resampler[Series]) -> Series[int]: ...

pandas-stubs/core/tools/datetimes.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def to_datetime(
4747
format: str | None = ...,
4848
exact: bool = ...,
4949
unit: str | None = ...,
50-
infer_datetime_format: bool = ...,
5150
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
5251
cache: bool = ...,
5352
) -> Timestamp: ...
@@ -61,7 +60,6 @@ def to_datetime(
6160
format: str | None = ...,
6261
exact: bool = ...,
6362
unit: str | None = ...,
64-
infer_datetime_format: bool = ...,
6563
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
6664
cache: bool = ...,
6765
) -> Timestamp | NaTType: ...
@@ -75,7 +73,6 @@ def to_datetime(
7573
format: str | None = ...,
7674
exact: bool = ...,
7775
unit: str | None = ...,
78-
infer_datetime_format: bool = ...,
7976
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
8077
cache: bool = ...,
8178
) -> TimestampSeries: ...
@@ -98,7 +95,6 @@ def to_datetime(
9895
format: str | None = ...,
9996
exact: bool = ...,
10097
unit: str | None = ...,
101-
infer_datetime_format: bool = ...,
10298
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
10399
cache: bool = ...,
104100
) -> DatetimeIndex: ...

pandas-stubs/io/parsers/readers.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def read_csv(
7171
| Sequence[Sequence[int]]
7272
| Mapping[str, Sequence[int | str]]
7373
) = ...,
74-
infer_datetime_format: bool = ...,
7574
keep_date_col: bool = ...,
7675
date_format: dict[Hashable, str] | str | None = ...,
7776
dayfirst: bool = ...,
@@ -136,7 +135,6 @@ def read_csv(
136135
| Sequence[Sequence[int]]
137136
| Mapping[str, Sequence[int | str]]
138137
) = ...,
139-
infer_datetime_format: bool = ...,
140138
keep_date_col: bool = ...,
141139
date_format: dict[Hashable, str] | str | None = ...,
142140
dayfirst: bool = ...,
@@ -201,7 +199,6 @@ def read_csv(
201199
| Sequence[Sequence[int]]
202200
| Mapping[str, Sequence[int | str]]
203201
) = ...,
204-
infer_datetime_format: bool = ...,
205202
keep_date_col: bool = ...,
206203
date_format: dict[Hashable, str] | str | None = ...,
207204
dayfirst: bool = ...,

pandas-stubs/io/stata.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class StataReader(StataParser, abc.Iterator):
100100
exc_value: BaseException | None,
101101
traceback: TracebackType | None,
102102
) -> None: ...
103-
def close(self) -> None: ...
104103
def __next__(self) -> DataFrame: ...
105104
def get_chunk(self, size: int | None = ...) -> DataFrame: ...
106105
def read(

0 commit comments

Comments
 (0)