Skip to content

Commit

Permalink
GH1063 Remove deprecated methods (#1064)
Browse files Browse the repository at this point in the history
* GH1063 Remove deprecated methods

* GH1063 Remove infer_datetime_format from read_csv and to_datetime
  • Loading branch information
loicdiridollou authored Nov 30, 2024
1 parent b6ae6e8 commit d3fcc64
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 40 deletions.
46 changes: 14 additions & 32 deletions pandas-stubs/core/resample.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -122,40 +122,22 @@ class Resampler(BaseGroupBy[NDFrameT]):
**kwargs,
) -> NDFrameT: ...
def asfreq(self, fill_value: Scalar | None = ...) -> NDFrameT: ...
def sum(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def prod(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def min(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def max(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def first(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def last(
self, numeric_only: bool = ..., min_count: int = ..., *args, **kwargs
) -> NDFrameT: ...
def median(self, numeric_only: bool = ..., *args, **kwargs) -> NDFrameT: ...
def mean(self, numeric_only: bool = ..., *args, **kwargs) -> NDFrameT: ...
def std(
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
) -> NDFrameT: ...
def var(
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
) -> NDFrameT: ...
def sem(
self, ddof: int = ..., numeric_only: bool = ..., *args, **kwargs
) -> NDFrameT: ...
def ohlc(self, *args, **kwargs) -> DataFrame: ...
def sum(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def prod(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def min(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def max(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def first(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def last(self, numeric_only: bool = ..., min_count: int = ...) -> NDFrameT: ...
def median(self, numeric_only: bool = ...) -> NDFrameT: ...
def mean(self, numeric_only: bool = ...) -> NDFrameT: ...
def std(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
def var(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
def sem(self, ddof: int = ..., numeric_only: bool = ...) -> NDFrameT: ...
def ohlc(self) -> DataFrame: ...
@overload
def nunique(self: Resampler[Series], *args, **kwargs) -> Series[int]: ...
def nunique(self: Resampler[Series]) -> Series[int]: ...
@overload
def nunique(self: Resampler[DataFrame], *args, **kwargs) -> DataFrame: ...
def nunique(self: Resampler[DataFrame]) -> DataFrame: ...
def size(self) -> Series[int]: ...
@overload
def count(self: Resampler[Series]) -> Series[int]: ...
Expand Down
4 changes: 0 additions & 4 deletions pandas-stubs/core/tools/datetimes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def to_datetime(
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
infer_datetime_format: bool = ...,
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
cache: bool = ...,
) -> Timestamp: ...
Expand All @@ -61,7 +60,6 @@ def to_datetime(
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
infer_datetime_format: bool = ...,
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
cache: bool = ...,
) -> Timestamp | NaTType: ...
Expand All @@ -75,7 +73,6 @@ def to_datetime(
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
infer_datetime_format: bool = ...,
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
cache: bool = ...,
) -> TimestampSeries: ...
Expand All @@ -98,7 +95,6 @@ def to_datetime(
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
infer_datetime_format: bool = ...,
origin: Literal["julian", "unix"] | TimestampConvertibleTypes = ...,
cache: bool = ...,
) -> DatetimeIndex: ...
3 changes: 0 additions & 3 deletions pandas-stubs/io/parsers/readers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def read_csv(
| Sequence[Sequence[int]]
| Mapping[str, Sequence[int | str]]
) = ...,
infer_datetime_format: bool = ...,
keep_date_col: bool = ...,
date_format: dict[Hashable, str] | str | None = ...,
dayfirst: bool = ...,
Expand Down Expand Up @@ -136,7 +135,6 @@ def read_csv(
| Sequence[Sequence[int]]
| Mapping[str, Sequence[int | str]]
) = ...,
infer_datetime_format: bool = ...,
keep_date_col: bool = ...,
date_format: dict[Hashable, str] | str | None = ...,
dayfirst: bool = ...,
Expand Down Expand Up @@ -201,7 +199,6 @@ def read_csv(
| Sequence[Sequence[int]]
| Mapping[str, Sequence[int | str]]
) = ...,
infer_datetime_format: bool = ...,
keep_date_col: bool = ...,
date_format: dict[Hashable, str] | str | None = ...,
dayfirst: bool = ...,
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/io/stata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class StataReader(StataParser, abc.Iterator):
exc_value: BaseException | None,
traceback: TracebackType | None,
) -> None: ...
def close(self) -> None: ...
def __next__(self) -> DataFrame: ...
def get_chunk(self, size: int | None = ...) -> DataFrame: ...
def read(
Expand Down

0 comments on commit d3fcc64

Please sign in to comment.