Skip to content

MAINT: Bump pandas to 1.5.0 #317

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

Merged
merged 29 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5c8f2b7
MAINT: Bump pandas to 1.5.0
bashtage Sep 20, 2022
198cd61
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
7f7547c
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
a273543
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
6077a06
MAINT: Remove deprecated argument, add missing
bashtage Sep 20, 2022
59a3e1f
MAINT: Remove deprecated argument, add missing
bashtage Sep 20, 2022
93c1d23
MAINT: Remove deprecated argument, add missing
bashtage Sep 20, 2022
af34b24
MAINT: Remove deprecated argument, add missing
bashtage Sep 20, 2022
bfabde1
MAINT: Remove deprecated argument, add missing
bashtage Sep 20, 2022
8b1b164
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
693c101
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
f318212
MAINT: Remove deprecated argument
bashtage Sep 20, 2022
a739249
MAINT: Fix errors created by deprecations
bashtage Sep 20, 2022
52fa043
TST: Update tests for 1.5
bashtage Sep 20, 2022
f468280
TST: Fix issues due to changes in tests
bashtage Sep 20, 2022
15699fa
CLN: Final cleanups for 1.5.x compat
bashtage Sep 20, 2022
b781bbe
Merge remote-tracking branch 'upstream/main' into move-to-1.5.0
Sep 22, 2022
68ef1c2
MAINT: Implement remaining deprecations
Sep 23, 2022
48cdc77
MAINT: Fix small typing issues
bashtage Sep 23, 2022
905fd1d
REV: Revery changes to factorize
bashtage Sep 24, 2022
b97aec2
MAINT: Remove properties from ExcelWriter
bashtage Sep 24, 2022
32a0668
ENH: Add new argument to resample
bashtage Sep 24, 2022
5da6992
CLN: Remove __array__wrap__
bashtage Sep 24, 2022
1a1f685
ENH: Add numeric_only to windowing
bashtage Sep 24, 2022
508f600
ENH: Add styler changes
bashtage Sep 24, 2022
e263803
REV: Revertexcel deletions
bashtage Sep 24, 2022
7e251b5
REV: Revert groupby changes
bashtage Sep 24, 2022
dccf9aa
CLN: Remove older deprecated code
bashtage Sep 24, 2022
f74fafb
BUG: Fix rsplit type when expand is True
Sep 26, 2022
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
1 change: 0 additions & 1 deletion pandas-stubs/core/algorithms.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def unique(values: ExtensionArray) -> ExtensionArray: ...
def factorize(
values: Any,
sort: bool = ...,
na_sentinel: int | None = ...,
use_na_sentinel: bool = ...,
size_hint: int | None = ...,
) -> tuple[np.ndarray, np.ndarray | Index]: ...
Expand Down
19 changes: 3 additions & 16 deletions pandas-stubs/core/arrays/categorical.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,9 @@ class Categorical(ExtensionArray, PandasObject):
) -> Categorical: ...
@property
def codes(self) -> np_ndarray_int: ...
@overload
def set_ordered(self, value, inplace: Literal[True]) -> None: ...
@overload
def set_ordered(self, value, inplace: Literal[False] = ...) -> Categorical: ...
@overload
def set_ordered(self, value, inplace: bool = ...) -> Categorical | None: ...
@overload
def as_ordered(self, inplace: Literal[True]) -> None: ...
@overload
def as_ordered(self, inplace: Literal[False] = ...) -> Categorical: ...
@overload
def as_ordered(self, inplace: bool = ...) -> Categorical | None: ...
@overload
def as_unordered(self, inplace: Literal[True]) -> None: ...
@overload
def as_unordered(self, inplace: Literal[False] = ...) -> Categorical: ...
def set_ordered(self, value) -> Categorical: ...
def as_ordered(self) -> Categorical: ...
def as_unordered(self) -> Categorical: ...
@overload
def set_categories(
self, new_categories, ordered=..., rename: bool = ..., *, inplace: Literal[True]
Expand Down
8 changes: 1 addition & 7 deletions pandas-stubs/core/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ from pandas._typing import (
npt,
)

# TODO: These two moved to pandas.errors after switch to 1.5.x
class DataError(Exception): ...
class SpecificationError(Exception): ...

class PandasObject(DirNamesMixin):
def __sizeof__(self) -> int: ...

Expand Down Expand Up @@ -80,13 +76,11 @@ class IndexOpsMixin:
@property
def is_unique(self) -> bool: ...
@property
def is_monotonic(self) -> bool: ...
@property
def is_monotonic_decreasing(self) -> bool: ...
@property
def is_monotonic_increasing(self) -> bool: ...
def factorize(
self, sort: bool = ..., na_sentinel: int = ...
self, sort: bool = ...
) -> tuple[np.ndarray, np.ndarray | Index | Categorical]: ...
def searchsorted(
self, value, side: Literal["left", "right"] = ..., sorter=...
Expand Down
4 changes: 0 additions & 4 deletions pandas-stubs/core/common.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ from typing import (

from pandas._typing import T

# TODO: Remove from here after 1.5.x is target, moved to pandas.errors
class SettingWithCopyError(ValueError): ...
class SettingWithCopyWarning(Warning): ...

def flatten(line) -> None: ...
def consensus_name_attr(objs): ...
def is_bool_indexer(key) -> bool: ...
Expand Down
3 changes: 0 additions & 3 deletions pandas-stubs/core/computation/engines.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import abc

# TODO: Remove from here after 1.5.x, moved to pandas.errors
class NumExprClobberingError(NameError): ...

class AbstractEngine(metaclass=abc.ABCMeta):
has_neg_frac: bool = ...
expr = ...
Expand Down
15 changes: 0 additions & 15 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1170,15 +1170,13 @@ class DataFrame(NDFrame, OpsMixin):
self,
q: float = ...,
axis: AxisType = ...,
numeric_only: _bool = ...,
interpolation: QuantileInterpolation = ...,
) -> Series: ...
@overload
def quantile(
self,
q: list[float] | np.ndarray,
axis: AxisType = ...,
numeric_only: _bool = ...,
interpolation: QuantileInterpolation = ...,
) -> DataFrame: ...
def to_timestamp(
Expand Down Expand Up @@ -1523,15 +1521,13 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def kurtosis(
self,
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def last(self, offset) -> DataFrame: ...
Expand Down Expand Up @@ -1573,31 +1569,27 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def mean(
self,
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def median(
self,
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def min(
self,
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def mod(
Expand Down Expand Up @@ -1651,7 +1643,6 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> Series: ...
Expand All @@ -1660,7 +1651,6 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> Series: ...
Expand Down Expand Up @@ -1829,7 +1819,6 @@ class DataFrame(NDFrame, OpsMixin):
skipna: _bool | None = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
@overload
Expand All @@ -1854,7 +1843,6 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def slice_shift(self, periods: int = ..., axis: AxisType = ...) -> DataFrame: ...
Expand All @@ -1865,7 +1853,6 @@ class DataFrame(NDFrame, OpsMixin):
skipna: _bool = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool = ...,
**kwargs,
) -> Series: ...
def sub(
Expand All @@ -1887,7 +1874,6 @@ class DataFrame(NDFrame, OpsMixin):
axis: AxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> Series: ...
Expand Down Expand Up @@ -2023,7 +2009,6 @@ class DataFrame(NDFrame, OpsMixin):
skipna: _bool | None = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Series: ...
def where(
Expand Down
2 changes: 0 additions & 2 deletions pandas-stubs/core/indexes/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ class Index(IndexOpsMixin, PandasObject):
def get_level_values(self, level: int | _str) -> Index: ...
def droplevel(self, level: Level | list[Level] = ...): ...
@property
def is_monotonic(self) -> bool: ...
@property
def is_monotonic_increasing(self) -> bool: ...
@property
def is_monotonic_decreasing(self) -> bool: ...
Expand Down
3 changes: 0 additions & 3 deletions pandas-stubs/core/indexing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class _IndexSlice:

IndexSlice: _IndexSlice

# TODO: Remove from here after 1.5.x, moved to pandas.errors
class IndexingError(Exception): ...

class IndexingMixin:
@property
def iloc(self) -> _iLocIndexer: ...
Expand Down
15 changes: 0 additions & 15 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ from pandas._typing import (
IgnoreRaise,
IndexingInt,
JsonSeriesOrient,
Label,
Level,
ListLike,
MaskType,
Expand Down Expand Up @@ -395,7 +394,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
) -> _str: ...
def to_xarray(self) -> xr.DataArray: ...
def items(self) -> Iterable[tuple[Hashable, S1]]: ...
def iteritems(self) -> Iterable[tuple[Label, S1]]: ...
def keys(self) -> list: ...
@overload
def to_dict(self) -> dict[Hashable, S1]: ...
Expand Down Expand Up @@ -1345,15 +1343,13 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Scalar: ...
def kurtosis(
self,
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Scalar: ...
def le(
Expand Down Expand Up @@ -1393,31 +1389,27 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
skipna: _bool = ...,
*,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> S1: ...
def mean(
self,
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> float: ...
def median(
self,
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> float: ...
def min(
self,
axis: SeriesAxisType | None = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> S1: ...
def mod(
Expand Down Expand Up @@ -1461,7 +1453,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
axis: SeriesAxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> Scalar: ...
Expand All @@ -1470,7 +1461,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
axis: SeriesAxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> Scalar: ...
Expand Down Expand Up @@ -1559,15 +1549,13 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
skipna: _bool | None = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Scalar: ...
def skew(
self,
axis: SeriesAxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Scalar: ...
def std(
Expand All @@ -1576,7 +1564,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
skipna: _bool | None = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> float: ...
def sub(
Expand All @@ -1598,7 +1585,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
axis: SeriesAxisType | None = ...,
skipna: _bool | None = ...,
level: None = ...,
numeric_only: _bool | None = ...,
min_count: int = ...,
**kwargs,
) -> S1: ...
Expand All @@ -1624,7 +1610,6 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
skipna: _bool | None = ...,
level: None = ...,
ddof: int = ...,
numeric_only: _bool | None = ...,
**kwargs,
) -> Scalar: ...
@overload
Expand Down
Loading