@@ -6951,7 +6951,7 @@ def sort_index(
6951
6951
6952
6952
def value_counts (
6953
6953
self ,
6954
- subset : Sequence [ Hashable ] | None = None ,
6954
+ subset : IndexLabel | None = None ,
6955
6955
normalize : bool = False ,
6956
6956
sort : bool = True ,
6957
6957
ascending : bool = False ,
@@ -7075,8 +7075,8 @@ def value_counts(
7075
7075
if normalize :
7076
7076
counts /= counts .sum ()
7077
7077
7078
- # Force MultiIndex for single column
7079
- if is_list_like (subset ) and len (subset ) == 1 :
7078
+ # Force MultiIndex for a list_like subset with a single column
7079
+ if is_list_like (subset ) and len (subset ) == 1 : # type: ignore[arg-type]
7080
7080
counts .index = MultiIndex .from_arrays (
7081
7081
[counts .index ], names = [counts .index .name ]
7082
7082
)
@@ -8986,7 +8986,7 @@ def pivot_table(
8986
8986
sort = sort ,
8987
8987
)
8988
8988
8989
- def stack (self , level : Level = - 1 , dropna : bool = True , sort : bool = True ):
8989
+ def stack (self , level : IndexLabel = - 1 , dropna : bool = True , sort : bool = True ):
8990
8990
"""
8991
8991
Stack the prescribed level(s) from columns to index.
8992
8992
@@ -9291,7 +9291,7 @@ def explode(
9291
9291
9292
9292
return result .__finalize__ (self , method = "explode" )
9293
9293
9294
- def unstack (self , level : Level = - 1 , fill_value = None , sort : bool = True ):
9294
+ def unstack (self , level : IndexLabel = - 1 , fill_value = None , sort : bool = True ):
9295
9295
"""
9296
9296
Pivot a level of the (necessarily hierarchical) index labels.
9297
9297
0 commit comments