-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLEAN: remove nonpublic stubs (#170)
* CLEAN: remove nonpublic stubs * put back pd.value_counts()
- Loading branch information
Showing
6 changed files
with
117 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,40 @@ | ||
from typing import Any | ||
from typing import ( | ||
Any, | ||
overload, | ||
) | ||
|
||
import numpy as np | ||
from pandas.core.indexes.base import Index | ||
|
||
def unique(values): ... | ||
|
||
unique1d = unique | ||
|
||
def isin(comps, values) -> np.ndarray: ... | ||
from pandas import ( | ||
Categorical, | ||
Index, | ||
Series, | ||
) | ||
from pandas.api.extensions import ExtensionArray | ||
|
||
from pandas._typing import AnyArrayLike | ||
|
||
@overload | ||
def unique(values: Index) -> Index: ... | ||
@overload | ||
def unique(values: Categorical) -> Categorical: ... | ||
@overload | ||
def unique(values: Series) -> np.ndarray | ExtensionArray: ... | ||
@overload | ||
def unique(values: np.ndarray | list) -> np.ndarray: ... | ||
@overload | ||
def unique(values: ExtensionArray) -> ExtensionArray: ... | ||
def factorize( | ||
values: Any, | ||
sort: bool = ..., | ||
na_sentinel: int = ..., | ||
na_sentinel: int | None = ..., | ||
use_na_sentinel: bool = ..., | ||
size_hint: int | None = ..., | ||
) -> tuple[np.ndarray, np.ndarray | Index]: ... | ||
def value_counts( | ||
values, | ||
values: AnyArrayLike | list | tuple, | ||
sort: bool = ..., | ||
ascending: bool = ..., | ||
normalize: bool = ..., | ||
bins=..., | ||
bins: int | None = ..., | ||
dropna: bool = ..., | ||
) -> Series: ... | ||
def duplicated(values, keep=...) -> np.ndarray: ... | ||
def mode(values, dropna: bool = ...) -> Series: ... | ||
def rank( | ||
values, | ||
axis: int = ..., | ||
method: str = ..., | ||
na_option: str = ..., | ||
ascending: bool = ..., | ||
pct: bool = ..., | ||
): ... | ||
def checked_add_with_arr(arr, b, arr_mask=..., b_mask=...): ... | ||
def quantile(x, q, interpolation_method: str = ...): ... | ||
|
||
class SelectN: | ||
obj = ... | ||
n = ... | ||
keep = ... | ||
def __init__(self, obj, n: int, keep: str) -> None: ... | ||
def nlargest(self): ... | ||
def nsmallest(self): ... | ||
@staticmethod | ||
def is_valid_dtype_n_method(dtype) -> bool: ... | ||
|
||
class SelectNSeries(SelectN): | ||
def compute(self, method): ... | ||
|
||
class SelectNFrame(SelectN): | ||
columns = ... | ||
def __init__(self, obj, n: int, keep: str, columns) -> None: ... | ||
def compute(self, method): ... | ||
|
||
def take(arr, indices, axis: int = ..., allow_fill: bool = ..., fill_value=...): ... | ||
def take_nd( | ||
arr, indexer, axis: int = ..., out=..., fill_value=..., allow_fill: bool = ... | ||
): ... | ||
|
||
take_1d = take_nd | ||
|
||
def take_2d_multi(arr, indexer, fill_value=...): ... | ||
def searchsorted(arr, value, side: str = ..., sorter=...): ... | ||
def diff(arr, n: int, axis: int = ..., stacklevel=...): ... | ||
def safe_sort( | ||
values, | ||
codes=..., | ||
na_sentinel: int = ..., | ||
assume_unique: bool = ..., | ||
verify: bool = ..., | ||
) -> np.ndarray | tuple[np.ndarray, np.ndarray]: ... | ||
|
||
from pandas import Series |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters