Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandas 2.0 removals for NDFrame and subclasses #930

Merged
merged 6 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ class DataFrame(NDFrame, OpsMixin):
allow_duplicates: _bool = ...,
) -> None: ...
def assign(self, **kwargs) -> DataFrame: ...
def lookup(self, row_labels: Sequence, col_labels: Sequence) -> np.ndarray: ...
def align(
self,
other: NDFrameT,
Expand Down Expand Up @@ -1691,7 +1690,6 @@ class DataFrame(NDFrame, OpsMixin):
percentiles: list[float] | None = ...,
include: Literal["all"] | list[Dtype] | None = ...,
exclude: list[Dtype] | None = ...,
datetime_is_numeric: _bool | None = ...,
) -> DataFrame: ...
def div(
self,
Expand Down Expand Up @@ -1850,7 +1848,6 @@ class DataFrame(NDFrame, OpsMixin):
inplace: _bool = ...,
axis: Axis | None = ...,
level: Level | None = ...,
try_cast: _bool = ...,
) -> DataFrame: ...
def max(
self,
Expand Down Expand Up @@ -2107,7 +2104,6 @@ class DataFrame(NDFrame, OpsMixin):
numeric_only: _bool = ...,
**kwargs,
) -> Series: ...
def slice_shift(self, periods: int = ..., axis: Axis = ...) -> DataFrame: ...
def squeeze(self, axis: Axis | None = ...): ...
def std(
self,
Expand Down Expand Up @@ -2143,14 +2139,7 @@ class DataFrame(NDFrame, OpsMixin):
) -> Series: ...
def swapaxes(self, axis1: Axis, axis2: Axis, copy: _bool = ...) -> DataFrame: ...
def tail(self, n: int = ...) -> DataFrame: ...
def take(
self,
indices: list,
axis: Axis = ...,
is_copy: _bool | None = ...,
**kwargs,
) -> DataFrame: ...
def tshift(self, periods: int = ..., freq=..., axis: Axis = ...) -> DataFrame: ...
def take(self, indices: list, axis: Axis = ..., **kwargs) -> DataFrame: ...
def to_clipboard(
self, excel: _bool = ..., sep: _str | None = ..., **kwargs
) -> None: ...
Expand Down Expand Up @@ -2289,7 +2278,6 @@ class DataFrame(NDFrame, OpsMixin):
axis: Axis | None = ...,
copy: _bool = ...,
) -> DataFrame: ...
# def tshift
def tz_convert(
self,
tz,
Expand Down Expand Up @@ -2329,7 +2317,6 @@ class DataFrame(NDFrame, OpsMixin):
inplace: _bool = ...,
axis: Axis | None = ...,
level: Level | None = ...,
try_cast: _bool = ...,
) -> DataFrame: ...
# Move from generic because Series is Generic and it returns Series[bool] there
def __invert__(self) -> DataFrame: ...
Expand Down
18 changes: 2 additions & 16 deletions pandas-stubs/core/generic.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ class NDFrame(indexing.IndexingMixin):
self,
buf: FilePath | WriteBuffer[str],
columns: list[_str] | None = ...,
col_space: int | None = ...,
header: _bool | list[_str] = ...,
index: _bool = ...,
na_rep: _str = ...,
Expand All @@ -223,7 +222,6 @@ class NDFrame(indexing.IndexingMixin):
self,
buf: None = ...,
columns: list[_str] | None = ...,
col_space: int | None = ...,
header: _bool | list[_str] = ...,
index: _bool = ...,
na_rep: _str = ...,
Expand Down Expand Up @@ -294,9 +292,7 @@ class NDFrame(indexing.IndexingMixin):
errors: _str = ...,
storage_options: StorageOptions = ...,
) -> _str: ...
def take(
self, indices, axis=..., is_copy: _bool | None = ..., **kwargs
) -> Self: ...
def take(self, indices, axis=..., **kwargs) -> Self: ...
def __delitem__(self, idx: Hashable) -> None: ...
def reindex_like(
self,
Expand Down Expand Up @@ -474,7 +470,6 @@ class NDFrame(indexing.IndexingMixin):
inplace: _bool = ...,
axis=...,
level=...,
try_cast: _bool = ...,
): ...
def mask(
self,
Expand All @@ -484,11 +479,8 @@ class NDFrame(indexing.IndexingMixin):
inplace: _bool = ...,
axis=...,
level=...,
try_cast: _bool = ...,
): ...
def shift(self, periods=..., freq=..., axis=..., fill_value=...) -> Self: ...
def slice_shift(self, periods: int = ..., axis=...) -> Self: ...
def tshift(self, periods: int = ..., freq=..., axis=...) -> Self: ...
def truncate(self, before=..., after=..., axis=..., copy: _bool = ...) -> Self: ...
def tz_convert(self, tz, axis=..., level=..., copy: _bool = ...) -> Self: ...
def tz_localize(
Expand All @@ -501,13 +493,7 @@ class NDFrame(indexing.IndexingMixin):
nonexistent: str = ...,
) -> Self: ...
def abs(self) -> Self: ...
def describe(
self,
percentiles=...,
include=...,
exclude=...,
datetime_is_numeric: _bool | None = ...,
) -> NDFrame: ...
def describe(self, percentiles=..., include=..., exclude=...) -> NDFrame: ...
def pct_change(
self, periods=..., fill_method=..., limit=..., freq=..., **kwargs
) -> Self: ...
Expand Down
13 changes: 1 addition & 12 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
@property
def axes(self) -> list: ...
def take(
self,
indices: Sequence,
axis: AxisIndex = ...,
is_copy: _bool | None = ...,
**kwargs,
self, indices: Sequence, axis: AxisIndex = ..., **kwargs
) -> Series[S1]: ...
def __getattr__(self, name: _str) -> S1: ...
@overload
Expand Down Expand Up @@ -1429,7 +1425,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
inplace: _bool = ...,
axis: AxisIndex | None = ...,
level: Level | None = ...,
try_cast: _bool = ...,
) -> Series[S1]: ...
def mask(
self,
Expand All @@ -1445,11 +1440,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
inplace: _bool = ...,
axis: AxisIndex | None = ...,
level: Level | None = ...,
try_cast: _bool = ...,
) -> Series[S1]: ...
def slice_shift(self, periods: int = ..., axis: AxisIndex = ...) -> Series[S1]: ...
def tshift(
self, periods: int = ..., freq=..., axis: AxisIndex = ...
) -> Series[S1]: ...
def truncate(
self,
Expand Down Expand Up @@ -1480,7 +1470,6 @@ class Series(IndexOpsMixin[S1], NDFrame):
percentiles: list[float] | None = ...,
include: Literal["all"] | list[S1] | None = ...,
exclude: S1 | list[S1] | None = ...,
datetime_is_numeric: _bool | None = ...,
) -> Series[S1]: ...
def pct_change(
self,
Expand Down
Loading