forked from pandas-dev/pandas-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.pyi
48 lines (45 loc) · 1.63 KB
/
category.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
from typing import Literal
import numpy as np
from pandas.core import accessor
from pandas.core.indexes.base import Index # , maybe_extract_name
from pandas.core.indexes.extension import ExtensionIndex
from pandas._typing import DtypeArg
class CategoricalIndex(ExtensionIndex, accessor.PandasDelegate):
codes: np.ndarray = ...
categories: Index = ...
def __new__(
cls,
data=...,
categories=...,
ordered=...,
dtype=...,
copy: bool = ...,
name=...,
) -> CategoricalIndex: ...
def equals(self, other): ...
@property
def inferred_type(self) -> str: ...
@property
def values(self): ...
def __contains__(self, key) -> bool: ...
def __array__(self, dtype=...) -> np.ndarray: ...
def astype(self, dtype: DtypeArg, copy: bool = ...) -> Index: ...
def fillna(self, value=..., downcast=...): ...
@property
def is_unique(self) -> bool: ...
@property
def is_monotonic_increasing(self) -> bool: ...
@property
def is_monotonic_decreasing(self) -> bool: ...
def unique(self, level=...): ...
def duplicated(self, keep: Literal["first", "last", False] = ...): ...
def get_loc(self, key): ...
def get_value(self, seriesArrayLike, key): ...
def where(self, cond, other=...): ...
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 map(self, mapper): ...
def delete(self, loc): ...
def insert(self, loc, item): ...