Skip to content

Commit

Permalink
pandas 2.0 removals in core/indexes (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdanal authored May 30, 2024
1 parent 40f0b71 commit 4145189
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 20 deletions.
8 changes: 0 additions & 8 deletions pandas-stubs/core/indexes/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ from pandas._typing import (
np_ndarray_bool,
np_ndarray_complex,
np_ndarray_float,
np_ndarray_int64,
type_t,
)

Expand Down Expand Up @@ -262,8 +261,6 @@ class Index(IndexOpsMixin[S1]):
) -> Self: ...
@property
def str(self) -> StringMethods[Self, MultiIndex]: ...
@property
def asi8(self) -> np_ndarray_int64: ...
def is_(self, other) -> bool: ...
def __len__(self) -> int: ...
def __array__(self, dtype=...) -> np.ndarray: ...
Expand All @@ -283,7 +280,6 @@ class Index(IndexOpsMixin[S1]):
def format(
self, name: bool = ..., formatter: Callable | None = ..., na_rep: _str = ...
) -> list[_str]: ...
def to_native_types(self, slicer=..., **kwargs): ...
def to_flat_index(self): ...
def to_series(self, index=..., name=...) -> Series: ...
def to_frame(self, index: bool = ..., name=...) -> DataFrame: ...
Expand Down Expand Up @@ -317,7 +313,6 @@ class Index(IndexOpsMixin[S1]):
def is_object(self) -> bool: ...
def is_categorical(self) -> bool: ...
def is_interval(self) -> bool: ...
def is_mixed(self) -> bool: ...
def holds_integer(self): ...
@property
def inferred_type(self) -> _str: ...
Expand Down Expand Up @@ -373,7 +368,6 @@ class Index(IndexOpsMixin[S1]):
def array(self) -> ExtensionArray: ...
def memory_usage(self, deep: bool = ...): ...
def where(self, cond, other=...): ...
def is_type_compatible(self, kind) -> bool: ...
def __contains__(self, key) -> bool: ...
def __setitem__(self, key, value) -> None: ...
@overload
Expand Down Expand Up @@ -401,8 +395,6 @@ class Index(IndexOpsMixin[S1]):
def sort(self, *args, **kwargs) -> None: ...
def shift(self, periods: int = ..., freq=...) -> None: ...
def argsort(self, *args, **kwargs): ...
def get_value(self, series, key): ...
def set_value(self, arr, key, value) -> None: ...
def get_indexer_non_unique(self, target): ...
def get_indexer_for(self, target, **kwargs): ...
@final
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/indexes/category.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ class CategoricalIndex(ExtensionIndex[S1], accessor.PandasDelegate):
def reindex(self, target, method=..., level=..., limit=..., tolerance=...): ...
def get_indexer(self, target, method=..., limit=..., tolerance=...): ...
def get_indexer_non_unique(self, target): ...
def take_nd(self, *args, **kwargs): ...
def delete(self, loc): ...
def insert(self, loc, item): ...
2 changes: 0 additions & 2 deletions pandas-stubs/core/indexes/datetimes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class DatetimeIndex(DatetimeTimedeltaMixin[Timestamp], DatetimeIndexProperties):
) -> TimedeltaIndex: ...
def to_series(self, index=..., name=...) -> TimestampSeries: ...
def snap(self, freq: str = ...): ...
def get_value(self, series, key): ...
def slice_indexer(self, start=..., end=..., step=...): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
@property
Expand All @@ -81,7 +80,6 @@ class DatetimeIndex(DatetimeTimedeltaMixin[Timestamp], DatetimeIndexProperties):
def indexer_between_time(
self, start_time, end_time, include_start: bool = ..., include_end: bool = ...
): ...
def to_perioddelta(self, freq) -> TimedeltaIndex: ...
def to_julian_date(self) -> Index[float]: ...
def isocalendar(self) -> DataFrame: ...
@property
Expand Down
4 changes: 0 additions & 4 deletions pandas-stubs/core/indexes/interval.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ from pandas._typing import (
)

from pandas.core.dtypes.dtypes import IntervalDtype as IntervalDtype
from pandas.core.dtypes.generic import ABCSeries

_EdgesInt: TypeAlias = (
Sequence[int]
Expand Down Expand Up @@ -247,7 +246,6 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin):
def mid(self) -> Index: ...
@property
def length(self) -> Index: ...
def get_value(self, series: ABCSeries, key): ...
@overload # type: ignore[override]
def __getitem__(
self,
Expand All @@ -264,8 +262,6 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin):
def __getitem__( # pyright: ignore[reportIncompatibleMethodOverride]
self, idx: int
) -> IntervalT: ...
@property
def is_all_dates(self) -> bool: ...
@overload # type: ignore[override]
def __gt__(
self, other: IntervalT | IntervalIndex[IntervalT]
Expand Down
3 changes: 0 additions & 3 deletions pandas-stubs/core/indexes/multi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class MultiIndex(Index[Any]):
def duplicated(self, keep: Literal["first", "last", False] = ...): ...
def fillna(self, value=..., downcast=...) -> None: ...
def dropna(self, how: Literal["any", "all"] = ...) -> Self: ...
def get_value(self, series, key): ...
def get_level_values(self, level: str | int) -> Index: ...
def unique(self, level=...): ...
def to_frame(
Expand All @@ -106,8 +105,6 @@ class MultiIndex(Index[Any]):
allow_duplicates: bool = ...,
) -> pd.DataFrame: ...
def to_flat_index(self): ...
@property
def is_all_dates(self) -> bool: ...
def remove_unused_levels(self): ...
@property
def nlevels(self) -> int: ...
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/indexes/period.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class PeriodIndex(DatetimeIndexOpsMixin[pd.Period], PeriodIndexFieldOps):
def is_full(self) -> bool: ...
@property
def inferred_type(self) -> str: ...
def get_value(self, series, key): ...
def get_indexer(self, target, method=..., limit=..., tolerance=...): ...
def get_indexer_non_unique(self, target): ...
def insert(self, loc, item): ...
Expand Down
1 change: 0 additions & 1 deletion pandas-stubs/core/indexes/timedeltas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class TimedeltaIndex(DatetimeTimedeltaMixin[Timedelta], TimedeltaIndexProperties
) -> Index[int]: ...
def __rfloordiv__(self, other: dt.timedelta | Sequence[dt.timedelta]) -> Index[int]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
def astype(self, dtype, copy: bool = ...): ...
def get_value(self, series, key): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
@property
def inferred_type(self) -> str: ...
Expand Down

0 comments on commit 4145189

Please sign in to comment.