@@ -65,13 +65,13 @@ def shape(self) -> tuple[int, int]:
65
65
Return number of rows and number of columns.
66
66
"""
67
67
68
- def groupby (self , keys : Sequence [str ], / ) -> GroupBy :
68
+ def groupby (self , keys : str | list [str ], / ) -> GroupBy :
69
69
"""
70
70
Group the DataFrame by the given columns.
71
71
72
72
Parameters
73
73
----------
74
- keys : Sequence [str]
74
+ keys : str | list [str]
75
75
76
76
Returns
77
77
-------
@@ -247,7 +247,7 @@ def get_column_names(self) -> Sequence[str]:
247
247
248
248
def sort (
249
249
self ,
250
- keys : Sequence [str ] | None = None ,
250
+ keys : str | list [str ] | None = None ,
251
251
* ,
252
252
ascending : Sequence [bool ] | bool = True ,
253
253
nulls_position : Literal ['first' , 'last' ] = 'last' ,
@@ -260,7 +260,7 @@ def sort(
260
260
261
261
Parameters
262
262
----------
263
- keys : Sequence[ str] | None
263
+ keys : str | list[str], optional
264
264
Names of columns to sort by.
265
265
If `None`, sort by all columns.
266
266
ascending : Sequence[bool] or bool
@@ -288,7 +288,7 @@ def sort(
288
288
289
289
def sorted_indices (
290
290
self ,
291
- keys : Sequence [str ] | None = None ,
291
+ keys : str | list [str ] | None = None ,
292
292
* ,
293
293
ascending : Sequence [bool ] | bool = True ,
294
294
nulls_position : Literal ['first' , 'last' ] = 'last' ,
@@ -300,7 +300,7 @@ def sorted_indices(
300
300
301
301
Parameters
302
302
----------
303
- keys : Sequence[ str] | None
303
+ keys : str | list[str], optional
304
304
Names of columns to sort by.
305
305
If `None`, sort by all columns.
306
306
ascending : Sequence[bool] or bool
@@ -793,10 +793,16 @@ def is_nan(self) -> DataFrame:
793
793
"""
794
794
...
795
795
796
- def unique_indices (self , keys : Sequence [str ], * , skip_nulls : bool = True ) -> Column [int ]:
796
+ def unique_indices (self , keys : str | list [str ] | None = None , * , skip_nulls : bool = True ) -> Column [int ]:
797
797
"""
798
798
Return indices corresponding to unique values across selected columns.
799
799
800
+ Parameters
801
+ ----------
802
+ keys : str | list[str], optional
803
+ Column names to consider when finding unique values.
804
+ If `None`, all columns are considered.
805
+
800
806
Returns
801
807
-------
802
808
Column[int]
0 commit comments