@@ -6956,7 +6956,7 @@ def sort_index(
6956
6956
6957
6957
def value_counts (
6958
6958
self ,
6959
- subset : Sequence [ Hashable ] | None = None ,
6959
+ subset : IndexLabel | None = None ,
6960
6960
normalize : bool = False ,
6961
6961
sort : bool = True ,
6962
6962
ascending : bool = False ,
@@ -7080,8 +7080,8 @@ def value_counts(
7080
7080
if normalize :
7081
7081
counts /= counts .sum ()
7082
7082
7083
- # Force MultiIndex for single column
7084
- if is_list_like (subset ) and len (subset ) == 1 :
7083
+ # Force MultiIndex for a list_like subset with a single column
7084
+ if is_list_like (subset ) and len (subset ) == 1 : # type: ignore[arg-type]
7085
7085
counts .index = MultiIndex .from_arrays (
7086
7086
[counts .index ], names = [counts .index .name ]
7087
7087
)
@@ -8991,7 +8991,7 @@ def pivot_table(
8991
8991
sort = sort ,
8992
8992
)
8993
8993
8994
- def stack (self , level : Level = - 1 , dropna : bool = True , sort : bool = True ):
8994
+ def stack (self , level : IndexLabel = - 1 , dropna : bool = True , sort : bool = True ):
8995
8995
"""
8996
8996
Stack the prescribed level(s) from columns to index.
8997
8997
@@ -9296,7 +9296,7 @@ def explode(
9296
9296
9297
9297
return result .__finalize__ (self , method = "explode" )
9298
9298
9299
- def unstack (self , level : Level = - 1 , fill_value = None , sort : bool = True ):
9299
+ def unstack (self , level : IndexLabel = - 1 , fill_value = None , sort : bool = True ):
9300
9300
"""
9301
9301
Pivot a level of the (necessarily hierarchical) index labels.
9302
9302
0 commit comments