Skip to content

Commit 7bd8065

Browse files
authored
CLN: pandas.core.algorithms.value_counts is internal (#1525)
value_counts is internal
1 parent 13d243f commit 7bd8065

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

pandas-stubs/__init__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ from pandas.core.api import (
6363
to_numeric as to_numeric,
6464
to_timedelta as to_timedelta,
6565
unique as unique,
66-
value_counts as value_counts,
6766
)
6867
from pandas.core.arrays.sparse import SparseDtype as SparseDtype
6968
from pandas.core.computation.api import eval as eval

pandas-stubs/_libs/tslibs/timestamps.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Timestamp(datetime, SupportsIndex):
100100
def fold(self) -> int: ...
101101
if sys.version_info >= (3, 12):
102102
@classmethod
103-
def fromtimestamp( # pyright: ignore[reportIncompatibleMethodOverride]
103+
def fromtimestamp( # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override]
104104
cls, t: float, tz: _tzinfo | str | None = ...
105105
) -> Self: ...
106106
else:

pandas-stubs/core/algorithms.pyi

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ from pandas.core.series import Series
1919

2020
from pandas._typing import (
2121
T_EXTENSION_ARRAY,
22-
AnyArrayLike,
2322
GenericT,
2423
IntervalT,
2524
TakeIndexer,
@@ -88,14 +87,6 @@ def factorize(
8887
use_na_sentinel: bool = ...,
8988
size_hint: int | None = ...,
9089
) -> tuple[np_1darray_int64, Categorical]: ...
91-
def value_counts(
92-
values: AnyArrayLike | list | tuple,
93-
sort: bool = True,
94-
ascending: bool = False,
95-
normalize: bool = False,
96-
bins: int | None = None,
97-
dropna: bool = True,
98-
) -> Series: ...
9990
def take(
10091
arr: np_ndarray[Any] | ExtensionArray | Index | Series,
10192
indices: TakeIndexer,

pandas-stubs/core/api.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from pandas.core.algorithms import (
22
factorize as factorize,
33
unique as unique,
4-
value_counts as value_counts,
54
)
65
from pandas.core.arrays import Categorical as Categorical
76
from pandas.core.arrays.arrow.dtype import ArrowDtype as ArrowDtype

tests/extension/decimal/array.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ def convert_values(param: Any) -> ExtensionArray | list[Any]:
342342
return cast(np_1darray_bool, np.asarray(res, dtype=bool))
343343

344344
def value_counts(self, dropna: bool = True) -> Series:
345-
from pandas.core.algorithms import value_counts
345+
from pandas.core.algorithms import ( # type: ignore[attr-defined] # isort: skip
346+
value_counts, # pyright: ignore[reportAttributeAccessIssue]
347+
)
346348

347349
return value_counts(self.to_numpy(), dropna=dropna)
348350

0 commit comments

Comments
 (0)