forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.pyi
58 lines (53 loc) · 1.86 KB
/
base.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from typing import Sequence
import numpy as np
from pandas._typing import (
ArrayLike,
Scalar,
npt,
)
from pandas.core.dtypes.dtypes import ExtensionDtype as ExtensionDtype
from pandas.core.dtypes.generic import ABCExtensionArray
class ExtensionArray:
def __getitem__(self, item) -> None: ...
def __setitem__(self, key: int | slice | np.ndarray, value) -> None: ...
def __len__(self) -> int: ...
def __iter__(self): ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
copy: bool = ...,
na_value: Scalar = ...,
) -> np.ndarray: ...
@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 = ...): ...
def isna(self) -> ArrayLike: ...
def argsort(
self, *, ascending: bool = ..., kind: str = ..., **kwargs
) -> np.ndarray: ...
def fillna(self, value=..., method=..., limit=...): ...
def dropna(self): ...
def shift(
self, periods: int = ..., fill_value: object = ...
) -> ABCExtensionArray: ...
def unique(self): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
# TODO: remove keyword-only when pandas removed na_sentinel
def factorize(
self, *, use_na_sentinel: bool = ...
) -> tuple[np.ndarray, ABCExtensionArray]: ...
def repeat(self, repeats, axis=...): ...
def take(
self, indices: Sequence[int], *, allow_fill: bool = ..., fill_value=...
) -> ABCExtensionArray: ...
def copy(self) -> ABCExtensionArray: ...
def view(self, dtype=...) -> ABCExtensionArray | np.ndarray: ...
def ravel(self, order=...) -> ABCExtensionArray: ...
class ExtensionOpsMixin: ...
class ExtensionScalarOpsMixin(ExtensionOpsMixin): ...