@@ -51,19 +51,24 @@ _NonIterableHashable: TypeAlias = (
5151 | pd .Timedelta
5252)
5353
54- _PivotTableIndexTypes : TypeAlias = Label | list [HashableT1 ] | Series | Grouper | None
55- _PivotTableColumnsTypes : TypeAlias = Label | list [HashableT2 ] | Series | Grouper | None
54+ _PivotTableIndexTypes : TypeAlias = (
55+ Label | Sequence [HashableT1 ] | Series | Grouper | None
56+ )
57+ _PivotTableColumnsTypes : TypeAlias = (
58+ Label | Sequence [HashableT2 ] | Series | Grouper | None
59+ )
60+ _PivotTableValuesTypes : TypeAlias = Label | Sequence [HashableT3 ] | None
5661
5762_ExtendedAnyArrayLike : TypeAlias = AnyArrayLike | ArrayLike
5863
5964@overload
6065def pivot_table (
6166 data : DataFrame ,
62- values : Label | list [ HashableT3 ] | None = ...,
67+ values : _PivotTableValuesTypes = ...,
6368 index : _PivotTableIndexTypes = ...,
6469 columns : _PivotTableColumnsTypes = ...,
6570 aggfunc : (
66- _PivotAggFunc | list [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
71+ _PivotAggFunc | Sequence [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
6772 ) = ...,
6873 fill_value : Scalar | None = ...,
6974 margins : bool = ...,
@@ -77,12 +82,12 @@ def pivot_table(
7782@overload
7883def pivot_table (
7984 data : DataFrame ,
80- values : Label | list [ HashableT3 ] | None = ...,
85+ values : _PivotTableValuesTypes = ...,
8186 * ,
8287 index : Grouper ,
8388 columns : _PivotTableColumnsTypes | Index | npt .NDArray = ...,
8489 aggfunc : (
85- _PivotAggFunc | list [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
90+ _PivotAggFunc | Sequence [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
8691 ) = ...,
8792 fill_value : Scalar | None = ...,
8893 margins : bool = ...,
@@ -94,12 +99,12 @@ def pivot_table(
9499@overload
95100def pivot_table (
96101 data : DataFrame ,
97- values : Label | list [ HashableT3 ] | None = ...,
102+ values : _PivotTableValuesTypes = ...,
98103 index : _PivotTableIndexTypes | Index | npt .NDArray = ...,
99104 * ,
100105 columns : Grouper ,
101106 aggfunc : (
102- _PivotAggFunc | list [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
107+ _PivotAggFunc | Sequence [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
103108 ) = ...,
104109 fill_value : Scalar | None = ...,
105110 margins : bool = ...,
@@ -111,9 +116,9 @@ def pivot_table(
111116def pivot (
112117 data : DataFrame ,
113118 * ,
114- index : _NonIterableHashable | list [HashableT1 ] = ...,
115- columns : _NonIterableHashable | list [HashableT2 ] = ...,
116- values : _NonIterableHashable | list [HashableT3 ] = ...,
119+ index : _NonIterableHashable | Sequence [HashableT1 ] = ...,
120+ columns : _NonIterableHashable | Sequence [HashableT2 ] = ...,
121+ values : _NonIterableHashable | Sequence [HashableT3 ] = ...,
117122) -> DataFrame : ...
118123@overload
119124def crosstab (
0 commit comments