Skip to content
Open
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
6 changes: 3 additions & 3 deletions pandas-stubs/core/arrays/boolean.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class BooleanDtype(ExtensionDtype):

class BooleanArray(BaseMaskedArray):
def __init__(
self, values: np_ndarray_bool, mask: np_ndarray_bool, copy: bool = ...
self, values: np_ndarray_bool, mask: np_ndarray_bool, copy: bool = False
) -> None: ...
@property
def dtype(self): ...
def __setitem__(self, key, value) -> None: ...
def any(self, *, skipna: bool = ..., **kwargs: Any): ...
def all(self, *, skipna: bool = ..., **kwargs: Any): ...
def any(self, *, skipna: bool = True, **kwargs: Any): ...
def all(self, *, skipna: bool = True, **kwargs: Any): ...
def __and__(
self,
other: (
Expand Down
4 changes: 2 additions & 2 deletions pandas-stubs/core/arrays/masked.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class BaseMaskedArray(ExtensionArray, ExtensionOpsMixin):
def __invert__(self): ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
dtype: npt.DTypeLike | None = None,
copy: bool = False,
na_value: Scalar = ...,
) -> np_1darray: ...
__array_priority__: int = ...
__array_priority__: int = 1000
def __array__(
self, dtype: NpDtype | None = None, copy: bool | None = None
) -> np_1darray: ...
Expand Down
16 changes: 9 additions & 7 deletions pandas-stubs/core/arrays/sparse/array.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ from pandas.core.arrays import (
from typing_extensions import Self

from pandas._typing import (
AxisInt,
DtypeArg,
NpDtype,
ScalarIndexer,
SequenceIndexer,
Expand All @@ -28,9 +30,9 @@ class SparseArray(ExtensionArray, ExtensionOpsMixin):
data,
sparse_index=...,
fill_value=...,
kind: str = ...,
dtype=...,
copy: bool = ...,
kind: str = "integer",
dtype: DtypeArg | None = None,
copy: bool = False,
) -> None: ...
@classmethod
def from_spmatrix(cls, data) -> Self: ...
Expand Down Expand Up @@ -73,10 +75,10 @@ class SparseArray(ExtensionArray, ExtensionOpsMixin):
def to_dense(self): ...
def nonzero(self): ...
def all(self, axis=..., *args: Any, **kwargs: Any): ...
def any(self, axis: int = ..., *args: Any, **kwargs: Any): ...
def sum(self, axis: int = 0, *args: Any, **kwargs: Any): ...
def cumsum(self, axis: int = ..., *args: Any, **kwargs: Any): ...
def mean(self, axis: int = ..., *args: Any, **kwargs: Any): ...
def any(self, axis: AxisInt = 0, *args: Any, **kwargs: Any): ...
def sum(self, axis: AxisInt = 0, *args: Any, **kwargs: Any): ...
def cumsum(self, axis: AxisInt = 0, *args: Any, **kwargs: Any): ...
def mean(self, axis: AxisInt = 0, *args: Any, **kwargs: Any): ...
@property
def T(self): ...
def __abs__(self): ...
4 changes: 3 additions & 1 deletion pandas-stubs/core/arrays/sparse/dtype.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ from pandas.core.dtypes.dtypes import (

class SparseDtype(ExtensionDtype):
def __init__(
self, dtype: Dtype | npt.DTypeLike = ..., fill_value: Scalar | None = ...
self,
dtype: Dtype | npt.DTypeLike = ...,
fill_value: Scalar | None = None,
) -> None: ...
@property
def fill_value(self) -> Scalar | None: ...
26 changes: 13 additions & 13 deletions pandas-stubs/core/indexes/accessors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -180,32 +180,32 @@ class _DatetimeRoundingMethods(Generic[_DTTimestampTimedeltaReturnType]):
def round(
self,
freq: Frequency | None,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = ...,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = "raise",
nonexistent: (
Literal["shift_forward", "shift_backward", "NaT", "raise"]
| timedelta
| Timedelta
) = ...,
) = "raise",
) -> _DTTimestampTimedeltaReturnType: ...
def floor(
self,
freq: Frequency | None,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = ...,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = "raise",
nonexistent: (
Literal["shift_forward", "shift_backward", "NaT", "raise"]
| timedelta
| Timedelta
) = ...,
) = "raise",
) -> _DTTimestampTimedeltaReturnType: ...
def ceil(
self,
freq: Frequency | None,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = ...,
ambiguous: Literal["raise", "infer", "NaT"] | bool | np_ndarray_bool = "raise",
nonexistent: (
Literal["shift_forward", "shift_backward", "NaT", "raise"]
| timedelta
| Timedelta
) = ...,
) = "raise",
) -> _DTTimestampTimedeltaReturnType: ...

_DTNormalizeReturnType = TypeVar(
Expand All @@ -231,14 +231,14 @@ class _DatetimeLikeNoTZMethods(
def tz_localize(
self,
tz: TimeZones,
ambiguous: TimeAmbiguous = ...,
nonexistent: TimeNonexistent = ...,
ambiguous: TimeAmbiguous = "raise",
nonexistent: TimeNonexistent = "raise",
) -> _DTNormalizeReturnType: ...
def tz_convert(self, tz: TimeZones) -> _DTNormalizeReturnType: ...
def normalize(self) -> _DTNormalizeReturnType: ...
def strftime(self, date_format: str) -> _DTStrKindReturnType: ...
def month_name(self, locale: str | None = ...) -> _DTStrKindReturnType: ...
def day_name(self, locale: str | None = ...) -> _DTStrKindReturnType: ...
def month_name(self, locale: str | None = None) -> _DTStrKindReturnType: ...
def day_name(self, locale: str | None = None) -> _DTStrKindReturnType: ...

class _DatetimeNoTZProperties(
_DatetimeLikeOps[
Expand Down Expand Up @@ -359,12 +359,12 @@ class _PeriodProperties(
def to_timestamp(
self,
freq: PeriodFrequency | None = None,
how: TimestampConvention = ...,
how: TimestampConvention = "start",
) -> _PeriodDTAReturnTypes: ...
def asfreq(
self,
freq: PeriodFrequency | None = None,
how: Literal["E", "END", "FINISH", "S", "START", "BEGIN"] = ...,
how: Literal["E", "END", "FINISH", "S", "START", "BEGIN"] = "E",
) -> _PeriodPAReturnTypes: ...

class PeriodIndexFieldOps(
Expand Down Expand Up @@ -432,7 +432,7 @@ class DatetimeIndexProperties(
def tzinfo(self) -> _tzinfo | None: ...
def to_pydatetime(self) -> np_1darray_object: ...
def std(
self, axis: int | None = ..., ddof: int = ..., skipna: bool = ...
self, axis: int | None = None, ddof: int = 1, skipna: bool = True
) -> Timedelta: ...

class TimedeltaIndexProperties(
Expand Down
Loading