This commit is contained in:
2025-09-07 22:09:54 +02:00
parent e1b817252c
commit 2fc0d000b6
7796 changed files with 2159515 additions and 933 deletions

View File

@ -0,0 +1,15 @@
from pandas.core.arrays.base import (
ExtensionArray as ExtensionArray,
ExtensionOpsMixin as ExtensionOpsMixin,
ExtensionScalarOpsMixin as ExtensionScalarOpsMixin,
)
from pandas.core.arrays.boolean import BooleanArray as BooleanArray
from pandas.core.arrays.categorical import Categorical as Categorical
from pandas.core.arrays.datetimes import DatetimeArray as DatetimeArray
from pandas.core.arrays.integer import IntegerArray as IntegerArray
from pandas.core.arrays.interval import IntervalArray as IntervalArray
from pandas.core.arrays.numpy_ import PandasArray as PandasArray
from pandas.core.arrays.period import PeriodArray as PeriodArray
from pandas.core.arrays.sparse import SparseArray as SparseArray
from pandas.core.arrays.string_ import StringArray as StringArray
from pandas.core.arrays.timedeltas import TimedeltaArray as TimedeltaArray

View File

@ -0,0 +1,11 @@
import pyarrow as pa
from pandas._libs.missing import NAType
from pandas.core.dtypes.base import StorageExtensionDtype
class ArrowDtype(StorageExtensionDtype):
pyarrow_dtype: pa.DataType
def __init__(self, pyarrow_dtype: pa.DataType) -> None: ...
@property
def na_value(self) -> NAType: ...

View File

@ -0,0 +1,81 @@
from collections.abc import Iterator
from typing import (
Any,
overload,
)
import numpy as np
from typing_extensions import Self
from pandas._typing import (
ArrayLike,
Scalar,
ScalarIndexer,
SequenceIndexer,
TakeIndexer,
np_1darray,
npt,
)
from pandas.core.dtypes.dtypes import ExtensionDtype as ExtensionDtype
class ExtensionArray:
@overload
def __getitem__(self, item: ScalarIndexer) -> Any: ...
@overload
def __getitem__(self, item: SequenceIndexer) -> Self: ...
def __setitem__(self, key: int | slice | np.ndarray, value: Any) -> None: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[Any]: ...
def __contains__(self, item: object) -> bool | np.bool_: ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
copy: bool = False,
na_value: Scalar = ...,
) -> np_1darray[Any]: ...
@property
def dtype(self) -> ExtensionDtype: ...
@property
def shape(self) -> tuple[int, ...]: ...
@property
def ndim(self) -> int: ...
@property
def nbytes(self) -> int: ...
def astype(self, dtype, copy: bool = True): ...
def isna(self) -> ArrayLike: ...
def argsort(
self, *, ascending: bool = ..., kind: str = ..., **kwargs
) -> np_1darray: ...
def fillna(self, value=..., method=None, limit=None): ...
def dropna(self): ...
def shift(self, periods: int = 1, fill_value: object = ...) -> Self: ...
def unique(self): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
def factorize(self, use_na_sentinel: bool = True) -> tuple[np_1darray, Self]: ...
def repeat(self, repeats, axis=...): ...
def take(
self,
indexer: TakeIndexer,
*,
allow_fill: bool = ...,
fill_value=...,
) -> Self: ...
def copy(self) -> Self: ...
def view(self, dtype=...) -> Self | np_1darray: ...
def ravel(self, order="C") -> Self: ...
def tolist(self) -> list: ...
def _reduce(
self, name: str, *, skipna: bool = ..., keepdims: bool = ..., **kwargs
) -> object: ...
def _accumulate(self, name: str, *, skipna: bool = ..., **kwargs) -> Self: ...
class ExtensionOpsMixin:
@classmethod
def _add_arithmetic_ops(cls) -> None: ...
@classmethod
def _add_comparison_ops(cls) -> None: ...
@classmethod
def _add_logical_ops(cls) -> None: ...
class ExtensionScalarOpsMixin(ExtensionOpsMixin): ...

View File

@ -0,0 +1,25 @@
import numpy as np
from pandas.core.arrays.masked import BaseMaskedArray as BaseMaskedArray
from pandas._libs.missing import NAType
from pandas._typing import type_t
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
class BooleanDtype(ExtensionDtype):
@property
def na_value(self) -> NAType: ...
@classmethod
def construct_array_type(cls) -> type_t[BooleanArray]: ...
class BooleanArray(BaseMaskedArray):
def __init__(
self, values: np.ndarray, mask: np.ndarray, copy: bool = ...
) -> None: ...
@property
def dtype(self): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __setitem__(self, key, value) -> None: ...
def astype(self, dtype, copy: bool = True): ...
def any(self, *, skipna: bool = ..., **kwargs): ...
def all(self, *, skipna: bool = ..., **kwargs): ...

View File

@ -0,0 +1,161 @@
from collections.abc import (
Callable,
Sequence,
)
from typing import (
Any,
overload,
)
import numpy as np
from pandas import Series
from pandas.core.accessor import PandasDelegate as PandasDelegate
from pandas.core.arrays.base import ExtensionArray as ExtensionArray
from pandas.core.base import NoNewAttributesMixin as NoNewAttributesMixin
from pandas.core.indexes.base import Index
from typing_extensions import Self
from pandas._typing import (
ArrayLike,
Dtype,
ListLike,
Ordered,
PositionalIndexerTuple,
Scalar,
ScalarIndexer,
SequenceIndexer,
TakeIndexer,
np_1darray,
)
from pandas.core.dtypes.dtypes import CategoricalDtype as CategoricalDtype
def contains(cat, key, container): ...
class Categorical(ExtensionArray):
__array_priority__: int = ...
def __init__(
self,
values: ListLike,
categories=...,
ordered: bool | None = ...,
dtype: CategoricalDtype | None = ...,
fastpath: bool = ...,
) -> None: ...
@property
def categories(self): ...
@property
def ordered(self) -> Ordered: ...
@property
def dtype(self) -> CategoricalDtype: ...
def astype(self, dtype: Dtype, copy: bool = True) -> ArrayLike: ...
def size(self) -> int: ...
def tolist(self) -> list[Scalar]: ...
to_list = ...
@classmethod
def from_codes(
cls,
codes: Sequence[int],
categories: Index | None = ...,
ordered: bool | None = ...,
dtype: CategoricalDtype | None = ...,
fastpath: bool = ...,
) -> Categorical: ...
@property
def codes(self) -> np_1darray[np.signedinteger]: ...
def set_ordered(self, value) -> Categorical: ...
def as_ordered(self) -> Categorical: ...
def as_unordered(self) -> Categorical: ...
def set_categories(
self,
new_categories,
ordered: bool | None = False,
rename: bool = False,
) -> Categorical: ...
def rename_categories(self, new_categories) -> Categorical: ...
def reorder_categories(
self, new_categories, ordered: bool | None = ...
) -> Categorical: ...
def add_categories(self, new_categories) -> Categorical: ...
def remove_categories(self, removals) -> Categorical: ...
def remove_unused_categories(self) -> Categorical: ...
def map(self, mapper): ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __lt__(self, other) -> bool: ...
def __gt__(self, other) -> bool: ...
def __le__(self, other) -> bool: ...
def __ge__(self, other) -> bool: ...
@property
def shape(self): ...
def shift(self, periods=1, fill_value=...): ...
def __array__(self, dtype=...) -> np_1darray: ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
@property
def T(self): ...
@property
def nbytes(self) -> int: ...
def memory_usage(self, deep: bool = ...): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
def isna(self) -> np_1darray[np.bool]: ...
def isnull(self) -> np_1darray[np.bool]: ...
def notna(self) -> np_1darray[np.bool]: ...
def notnull(self) -> np_1darray[np.bool]: ...
def dropna(self): ...
def value_counts(self, dropna: bool = True): ...
def check_for_ordered(self, op) -> None: ...
def argsort(self, *, ascending: bool = ..., kind: str = ..., **kwargs): ...
def sort_values(
self, *, inplace: bool = ..., ascending: bool = ..., na_position: str = ...
): ...
def view(self, dtype=...): ...
def fillna(self, value=..., method=None, limit=None): ...
def take(
self, indexer: TakeIndexer, *, allow_fill: bool = ..., fill_value=...
) -> Categorical: ...
def __len__(self) -> int: ...
def __iter__(self): ...
def __contains__(self, key) -> bool: ...
@overload
def __getitem__(self, key: ScalarIndexer) -> Any: ...
@overload
def __getitem__(
self,
key: SequenceIndexer | PositionalIndexerTuple,
) -> Self: ...
def __setitem__(self, key, value) -> None: ...
def min(self, *, skipna: bool = ...): ...
def max(self, *, skipna: bool = ...): ...
def unique(self): ...
def equals(self, other): ...
def describe(self): ...
def repeat(self, repeats, axis=...): ...
def isin(self, values): ...
class CategoricalAccessor(PandasDelegate, NoNewAttributesMixin):
def __init__(self, data) -> None: ...
@property
def codes(self) -> Series[int]: ...
@property
def categories(self) -> Index: ...
@property
def ordered(self) -> bool | None: ...
def rename_categories(
self, new_categories: ListLike | dict[Any, Any] | Callable[[Any], Any]
) -> Series: ...
def reorder_categories(
self,
new_categories: ListLike,
ordered: bool = ...,
) -> Series: ...
def add_categories(self, new_categories: Scalar | ListLike) -> Series: ...
def remove_categories(self, removals: Scalar | ListLike) -> Series: ...
def remove_unused_categories(self) -> Series: ...
def set_categories(
self,
new_categories: ListLike,
ordered: bool | None = False,
rename: bool = False,
) -> Series: ...
def as_ordered(self) -> Series: ...
def as_unordered(self) -> Series: ...

View File

@ -0,0 +1,114 @@
from collections.abc import Sequence
from typing import overload
import numpy as np
from pandas.core.arrays.base import (
ExtensionArray,
ExtensionOpsMixin,
)
from typing_extensions import (
Self,
TypeAlias,
)
from pandas._libs import (
NaT as NaT,
NaTType as NaTType,
)
from pandas._typing import (
DatetimeLikeScalar,
PositionalIndexerTuple,
ScalarIndexer,
SequenceIndexer,
TimeAmbiguous,
TimeNonexistent,
TimeUnit,
)
DTScalarOrNaT: TypeAlias = DatetimeLikeScalar | NaTType
class DatelikeOps:
def strftime(self, date_format): ...
class TimelikeOps:
@property
def unit(self) -> TimeUnit: ...
def as_unit(self, unit: TimeUnit) -> Self: ...
def round(
self,
freq,
ambiguous: TimeAmbiguous = "raise",
nonexistent: TimeNonexistent = "raise",
): ...
def floor(
self,
freq,
ambiguous: TimeAmbiguous = "raise",
nonexistent: TimeNonexistent = "raise",
): ...
def ceil(
self,
freq,
ambiguous: TimeAmbiguous = "raise",
nonexistent: TimeNonexistent = "raise",
): ...
class DatetimeLikeArrayMixin(ExtensionOpsMixin, ExtensionArray):
@property
def ndim(self) -> int: ...
@property
def shape(self): ...
def reshape(self, *args, **kwargs): ...
def ravel(self, *args, **kwargs): ... # pyrefly: ignore
def __iter__(self): ...
@property
def asi8(self) -> np.ndarray: ...
@property
def nbytes(self): ...
def __array__(self, dtype=...) -> np.ndarray: ...
@property
def size(self) -> int: ...
def __len__(self) -> int: ...
@overload
def __getitem__(self, key: ScalarIndexer) -> DTScalarOrNaT: ...
@overload
def __getitem__(
self,
key: SequenceIndexer | PositionalIndexerTuple,
) -> Self: ...
def __setitem__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
self, key: int | Sequence[int] | Sequence[bool] | slice, value
) -> None: ...
def astype(self, dtype, copy: bool = True): ...
def view(self, dtype=...): ...
def unique(self): ...
def copy(self): ...
def shift(self, periods: int = 1, fill_value=..., axis: int = ...): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
def repeat(self, repeats, *args, **kwargs): ... # pyrefly: ignore
def value_counts(self, dropna: bool = True): ...
def map(self, mapper): ...
def isna(self): ...
def fillna(self, value=..., method=None, limit=None): ...
@property
def freq(self): ...
@freq.setter
def freq(self, value) -> None: ...
@property
def freqstr(self): ...
@property
def inferred_freq(self): ...
@property
def resolution(self): ...
__pow__ = ...
__rpow__ = ...
__rmul__ = ...
def __add__(self, other): ...
def __radd__(self, other): ...
def __sub__(self, other): ...
def __rsub__(self, other): ...
def __iadd__(self, other): ...
def __isub__(self, other): ...
def min(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def max(self, *, axis=..., skipna: bool = ..., **kwargs): ...
def mean(self, *, skipna: bool = ...): ...

View File

@ -0,0 +1,85 @@
from datetime import tzinfo as _tzinfo
import numpy as np
from pandas.core.arrays.datetimelike import (
DatelikeOps,
DatetimeLikeArrayMixin,
TimelikeOps,
)
from pandas._typing import (
TimeAmbiguous,
TimeNonexistent,
TimeZones,
)
from pandas.core.dtypes.dtypes import DatetimeTZDtype as DatetimeTZDtype
class DatetimeArray(DatetimeLikeArrayMixin, TimelikeOps, DatelikeOps):
__array_priority__: int = ...
def __init__(self, values, dtype=..., freq=..., copy: bool = ...) -> None: ...
# ignore in dtype() is from the pandas source
@property
def dtype(self) -> np.dtype | DatetimeTZDtype: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
@property
def tz(self): ...
@tz.setter
def tz(self, value) -> None: ...
@property
def tzinfo(self) -> _tzinfo | None: ...
@property
def is_normalized(self): ...
def __array__(self, dtype=...) -> np.ndarray: ...
def __iter__(self): ...
def astype(self, dtype, copy: bool = True): ...
def tz_convert(self, tz: TimeZones): ...
def tz_localize(
self,
tz: TimeZones,
ambiguous: TimeAmbiguous = "raise",
nonexistent: TimeNonexistent = "raise",
): ...
def to_pydatetime(self): ...
def normalize(self): ...
def to_period(self, freq=...): ...
def to_perioddelta(self, freq): ...
def month_name(self, locale=...): ...
def day_name(self, locale=...): ...
@property
def time(self): ...
@property
def timetz(self): ...
@property
def date(self): ...
year = ...
month = ...
day = ...
hour = ...
minute = ...
second = ...
microsecond = ...
nanosecond = ...
dayofweek = ...
weekday = ...
dayofyear = ...
quarter = ...
days_in_month = ...
daysinmonth = ...
is_month_start = ...
is_month_end = ...
is_quarter_start = ...
is_quarter_end = ...
is_year_start = ...
is_year_end = ...
is_leap_year = ...
def to_julian_date(self): ...
def objects_to_datetime64ns(
data,
dayfirst,
yearfirst,
utc: bool = ...,
errors: str = ...,
require_iso8601: bool = ...,
allow_object: bool = ...,
): ...

View File

@ -0,0 +1,4 @@
from pandas.core.arrays.numeric import NumericDtype
class Float32Dtype(NumericDtype): ...
class Float64Dtype(NumericDtype): ...

View File

@ -0,0 +1,31 @@
from pandas.core.arrays.masked import BaseMaskedArray
from pandas._libs.missing import NAType
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
class _IntegerDtype(ExtensionDtype):
base: None
@property
def na_value(self) -> NAType: ...
@property
def itemsize(self) -> int: ...
@classmethod
def construct_array_type(cls) -> type[IntegerArray]: ...
class IntegerArray(BaseMaskedArray):
@property
def dtype(self) -> _IntegerDtype: ...
def __init__(self, values, mask, copy: bool = ...) -> None: ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __setitem__(self, key, value) -> None: ...
def astype(self, dtype, copy: bool = True): ...
class Int8Dtype(_IntegerDtype): ...
class Int16Dtype(_IntegerDtype): ...
class Int32Dtype(_IntegerDtype): ...
class Int64Dtype(_IntegerDtype): ...
class UInt8Dtype(_IntegerDtype): ...
class UInt16Dtype(_IntegerDtype): ...
class UInt32Dtype(_IntegerDtype): ...
class UInt64Dtype(_IntegerDtype): ...

View File

@ -0,0 +1,112 @@
from typing import overload
import numpy as np
from pandas import (
Index,
Series,
)
from pandas.core.arrays.base import ExtensionArray as ExtensionArray
from typing_extensions import (
Self,
TypeAlias,
)
from pandas._libs.interval import (
Interval as Interval,
IntervalMixin as IntervalMixin,
)
from pandas._typing import (
Axis,
Scalar,
ScalarIndexer,
SequenceIndexer,
TakeIndexer,
np_1darray,
)
IntervalOrNA: TypeAlias = Interval | float
class IntervalArray(IntervalMixin, ExtensionArray):
can_hold_na: bool = ...
def __new__(
cls, data, closed=..., dtype=..., copy: bool = ..., verify_integrity: bool = ...
): ...
@classmethod
def from_breaks(
cls,
breaks,
closed: str = "right",
copy: bool = False,
dtype=None,
): ...
@classmethod
def from_arrays(
cls,
left,
right,
closed: str = "right",
copy: bool = False,
dtype=...,
): ...
@classmethod
def from_tuples(
cls,
data,
closed: str = "right",
copy: bool = False,
dtype=None,
): ...
def __iter__(self): ...
def __len__(self) -> int: ...
@overload
def __getitem__(self, key: ScalarIndexer) -> IntervalOrNA: ...
@overload
def __getitem__(self, key: SequenceIndexer) -> Self: ...
def __setitem__(self, key, value) -> None: ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def fillna(self, value=..., method=None, limit=None): ...
@property
def dtype(self): ...
def astype(self, dtype, copy: bool = True): ...
def copy(self): ...
def isna(self): ...
@property
def nbytes(self) -> int: ...
@property
def size(self) -> int: ...
def shift(self, periods: int = 1, fill_value: object = ...) -> IntervalArray: ...
def take( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
self: Self,
indices: TakeIndexer,
*,
allow_fill: bool = ...,
fill_value=...,
axis=...,
**kwargs,
) -> Self: ...
def value_counts(self, dropna: bool = True): ...
@property
def left(self) -> Index: ...
@property
def right(self) -> Index: ...
@property
def closed(self) -> bool: ...
def set_closed(self, closed): ...
@property
def length(self) -> Index: ...
@property
def mid(self) -> Index: ...
@property
def is_non_overlapping_monotonic(self) -> bool: ...
def __array__(self, dtype=...) -> np_1darray: ...
def __arrow_array__(self, type=...): ...
def to_tuples(self, na_tuple: bool = True): ...
def repeat(self, repeats, axis: Axis | None = ...): ...
@overload
def contains(self, other: Series) -> Series[bool]: ...
@overload
def contains(
self, other: Scalar | ExtensionArray | Index | np.ndarray
) -> np_1darray[np.bool]: ...
def overlaps(self, other: Interval) -> bool: ...

View File

@ -0,0 +1,41 @@
from typing import (
Any,
overload,
)
import numpy as np
from pandas.core.arrays import (
ExtensionArray as ExtensionArray,
ExtensionOpsMixin,
)
from typing_extensions import Self
from pandas._typing import (
Scalar,
ScalarIndexer,
SequenceIndexer,
npt,
)
class BaseMaskedArray(ExtensionArray, ExtensionOpsMixin):
@overload
def __getitem__(self, item: ScalarIndexer) -> Any: ...
@overload
def __getitem__(self, item: SequenceIndexer) -> Self: ...
def __iter__(self): ...
def __len__(self) -> int: ...
def __invert__(self): ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
copy: bool = False,
na_value: Scalar = ...,
) -> np.ndarray: ...
__array_priority__: int = ...
def __array__(self, dtype=...) -> np.ndarray: ...
def __arrow_array__(self, type=...): ...
def isna(self): ...
@property
def nbytes(self) -> int: ...
def copy(self): ...
def value_counts(self, dropna: bool = True): ...

View File

@ -0,0 +1,3 @@
from pandas.core.dtypes.dtypes import BaseMaskedDtype
class NumericDtype(BaseMaskedDtype): ...

View File

@ -0,0 +1,17 @@
import numpy as np
from numpy.lib.mixins import NDArrayOperatorsMixin
from pandas.core.arrays.base import (
ExtensionArray,
ExtensionOpsMixin,
)
from pandas.core.dtypes.dtypes import ExtensionDtype
class PandasDtype(ExtensionDtype):
@property
def numpy_dtype(self) -> np.dtype: ...
@property
def itemsize(self) -> int: ...
class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...

View File

@ -0,0 +1,42 @@
import numpy as np
from pandas import PeriodDtype
from pandas.core.arrays.datetimelike import (
DatelikeOps,
DatetimeLikeArrayMixin,
)
from pandas._libs.tslibs import Timestamp
from pandas._libs.tslibs.period import Period
class PeriodArray(DatetimeLikeArrayMixin, DatelikeOps):
__array_priority__: int = ...
def __init__(self, values, freq=..., dtype=..., copy: bool = ...) -> None: ...
@property
def dtype(self) -> PeriodDtype: ...
def __array__(self, dtype=...) -> np.ndarray: ...
def __arrow_array__(self, type=...): ...
year: int = ...
month: int = ...
day: int = ...
hour: int = ...
minute: int = ...
second: int = ...
weekofyear: int = ...
week: int = ...
dayofweek: int = ...
weekday: int = ...
dayofyear: int = ...
day_of_year = ...
quarter: int = ...
qyear: int = ...
days_in_month: int = ...
daysinmonth: int = ...
@property
def is_leap_year(self) -> bool: ...
@property
def start_time(self) -> Timestamp: ...
@property
def end_time(self) -> Timestamp: ...
def to_timestamp(self, freq: str | None = ..., how: str = ...) -> Timestamp: ...
def asfreq(self, freq: str | None = ..., how: str = "E") -> Period: ...
def astype(self, dtype, copy: bool = True): ...

View File

@ -0,0 +1,6 @@
from pandas.core.arrays.sparse.accessor import (
SparseAccessor as SparseAccessor,
SparseFrameAccessor as SparseFrameAccessor,
)
from pandas.core.arrays.sparse.array import SparseArray as SparseArray
from pandas.core.arrays.sparse.dtype import SparseDtype as SparseDtype

View File

@ -0,0 +1,19 @@
from pandas import Series
from pandas.core.accessor import PandasDelegate
class BaseAccessor:
def __init__(self, data=...) -> None: ...
class SparseAccessor(BaseAccessor, PandasDelegate):
@classmethod
def from_coo(cls, A, dense_index: bool = False) -> Series: ...
def to_coo(self, row_levels=..., column_levels=..., sort_labels: bool = False): ...
def to_dense(self): ...
class SparseFrameAccessor(BaseAccessor, PandasDelegate):
@classmethod
def from_spmatrix(cls, data, index=..., columns=...): ...
def to_dense(self): ...
def to_coo(self): ...
@property
def density(self) -> float: ...

View File

@ -0,0 +1,82 @@
from enum import Enum
from typing import (
Any,
final,
overload,
)
import numpy as np
from pandas.core.arrays import (
ExtensionArray,
ExtensionOpsMixin,
)
from typing_extensions import Self
from pandas._typing import (
ScalarIndexer,
SequenceIndexer,
)
@final
class ellipsis(Enum):
Ellipsis = "..."
class SparseArray(ExtensionArray, ExtensionOpsMixin):
def __init__(
self,
data,
sparse_index=...,
fill_value=...,
kind: str = ...,
dtype=...,
copy: bool = ...,
) -> None: ...
@classmethod
def from_spmatrix(cls, data): ...
def __array__(self, dtype=..., copy=...) -> np.ndarray: ...
def __setitem__(self, key, value) -> None: ...
@property
def sp_index(self): ...
@property
def sp_values(self): ...
@property
def dtype(self): ...
@property
def fill_value(self): ...
@fill_value.setter
def fill_value(self, value) -> None: ...
@property
def kind(self) -> str: ...
def __len__(self) -> int: ...
@property
def nbytes(self) -> int: ...
@property
def density(self): ...
@property
def npoints(self) -> int: ...
def isna(self): ...
def fillna(self, value=..., method=..., limit=...): ...
def shift(self, periods: int = 1, fill_value=...): ...
def unique(self): ...
def value_counts(self, dropna: bool = True): ...
@overload
def __getitem__(self, key: ScalarIndexer) -> Any: ...
@overload
def __getitem__(
self,
key: SequenceIndexer | tuple[int | ellipsis, ...],
) -> Self: ...
def copy(self): ...
def astype(self, dtype=..., copy: bool = True): ...
def map(self, mapper): ...
def to_dense(self): ...
def nonzero(self): ...
def all(self, axis=..., *args, **kwargs): ...
def any(self, axis: int = ..., *args, **kwargs): ...
def sum(self, axis: int = 0, *args, **kwargs): ...
def cumsum(self, axis: int = ..., *args, **kwargs): ...
def mean(self, axis: int = ..., *args, **kwargs): ...
@property
def T(self): ...
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
def __abs__(self): ...

View File

@ -0,0 +1,17 @@
from pandas._typing import (
Dtype,
Scalar,
npt,
)
from pandas.core.dtypes.base import ExtensionDtype
from pandas.core.dtypes.dtypes import (
register_extension_dtype as register_extension_dtype,
)
class SparseDtype(ExtensionDtype):
def __init__(
self, dtype: Dtype | npt.DTypeLike = ..., fill_value: Scalar | None = ...
) -> None: ...
@property
def fill_value(self) -> Scalar | None: ...

View File

@ -0,0 +1,20 @@
from typing import Literal
from pandas.core.arrays import PandasArray
from pandas._libs.missing import NAType
from pandas.core.dtypes.base import ExtensionDtype
class StringDtype(ExtensionDtype):
def __init__(self, storage: Literal["python", "pyarrow"] | None = None) -> None: ...
@property
def na_value(self) -> NAType: ...
class StringArray(PandasArray):
def __init__(self, values, copy: bool = ...) -> None: ...
def __arrow_array__(self, type=...): ...
def __setitem__(self, key, value) -> None: ...
def fillna(self, value=..., method=None, limit=None): ...
def astype(self, dtype, copy: bool = True): ...
def value_counts(self, dropna: bool = True): ...

View File

@ -0,0 +1,65 @@
from collections.abc import Sequence
from datetime import timedelta
from pandas.core.arrays.datetimelike import (
DatetimeLikeArrayMixin,
TimelikeOps,
)
class TimedeltaArray(DatetimeLikeArrayMixin, TimelikeOps):
__array_priority__: int = ...
@property
def dtype(self): ...
def __init__(self, values, dtype=..., freq=..., copy: bool = ...) -> None: ...
def astype(self, dtype, copy: bool = True): ...
def sum(
self,
*,
axis=...,
dtype=...,
out=...,
keepdims: bool = ...,
initial=...,
skipna: bool = ...,
min_count: int = ...,
): ...
def std(
self,
*,
axis=...,
dtype=...,
out=...,
ddof: int = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def median(
self,
*,
axis=...,
out=...,
overwrite_input: bool = ...,
keepdims: bool = ...,
skipna: bool = ...,
): ...
def __mul__(self, other): ...
__rmul__ = ...
def __truediv__(self, other): ...
def __rtruediv__(self, other): ...
def __floordiv__(self, other): ...
def __rfloordiv__(self, other): ...
def __mod__(self, other): ...
def __rmod__(self, other): ...
def __divmod__(self, other): ...
def __rdivmod__(self, other): ...
def __neg__(self): ...
def __pos__(self): ...
def __abs__(self): ...
def total_seconds(self) -> int: ...
def to_pytimedelta(self) -> Sequence[timedelta]: ...
days: int = ...
seconds: int = ...
microseconds: int = ...
nanoseconds: int = ...
@property
def components(self) -> int: ...