@@ -187,7 +187,7 @@ def indexer_from_factorized(labels, shape, compress: bool = True):
187
187
return get_group_index_sorter (ids , ngroups )
188
188
189
189
190
- def lexsort_indexer (keys , orders = None , na_position = "last" ):
190
+ def lexsort_indexer (keys , orders = None , na_position : str = "last" ):
191
191
from pandas .core .arrays import Categorical
192
192
193
193
labels = []
@@ -233,7 +233,9 @@ def lexsort_indexer(keys, orders=None, na_position="last"):
233
233
return indexer_from_factorized (labels , shape )
234
234
235
235
236
- def nargsort (items , kind = "quicksort" , ascending : bool = True , na_position = "last" ):
236
+ def nargsort (
237
+ items , kind : str = "quicksort" , ascending : bool = True , na_position : str = "last"
238
+ ):
237
239
"""
238
240
This is intended to be a drop-in replacement for np.argsort which
239
241
handles NaNs. It adds ascending and na_position parameters.
@@ -273,7 +275,7 @@ class _KeyMapper:
273
275
Ease my suffering. Map compressed group id -> key tuple
274
276
"""
275
277
276
- def __init__ (self , comp_ids , ngroups , levels , labels ):
278
+ def __init__ (self , comp_ids , ngroups : int , levels , labels ):
277
279
self .levels = levels
278
280
self .labels = labels
279
281
self .comp_ids = comp_ids .astype (np .int64 )
0 commit comments