Skip to content

Commit 6400b9c

Browse files
committed
Series.value_counts returns Series[int].
1 parent 581c1eb commit 6400b9c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas-stubs/core/series.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ class Series(IndexOpsMixin, NDFrame, Generic[S1]):
11931193
ascending: _bool = ...,
11941194
bins: int | None = ...,
11951195
dropna: _bool = ...,
1196-
) -> Series[S1]: ...
1196+
) -> Series[int]: ...
11971197
def transpose(self, *args, **kwargs) -> Series[S1]: ...
11981198
@property
11991199
def T(self) -> Series[S1]: ...

tests/test_series.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ def test_types_idxmax() -> None:
367367

368368

369369
def test_types_value_counts() -> None:
370-
s = pd.Series([1, 2])
371-
s.value_counts()
370+
s = pd.Series(["a", "b"])
371+
check(assert_type(s.value_counts(), pd.Series[int]), pd.Series, int)
372372

373373

374374
def test_types_unique() -> None:

0 commit comments

Comments
 (0)