@@ -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
-------
@@ -255,7 +255,7 @@ def get_column_names(self) -> list[str]:
255
255
256
256
def sort (
257
257
self ,
258
- keys : Sequence [str ] | None = None ,
258
+ keys : str | list [str ] | None = None ,
259
259
* ,
260
260
ascending : Sequence [bool ] | bool = True ,
261
261
nulls_position : Literal ['first' , 'last' ] = 'last' ,
@@ -268,7 +268,7 @@ def sort(
268
268
269
269
Parameters
270
270
----------
271
- keys : Sequence[ str] | None
271
+ keys : str | list[str], optional
272
272
Names of columns to sort by.
273
273
If `None`, sort by all columns.
274
274
ascending : Sequence[bool] or bool
@@ -296,7 +296,7 @@ def sort(
296
296
297
297
def sorted_indices (
298
298
self ,
299
- keys : Sequence [str ] | None = None ,
299
+ keys : str | list [str ] | None = None ,
300
300
* ,
301
301
ascending : Sequence [bool ] | bool = True ,
302
302
nulls_position : Literal ['first' , 'last' ] = 'last' ,
@@ -308,7 +308,7 @@ def sorted_indices(
308
308
309
309
Parameters
310
310
----------
311
- keys : Sequence[ str] | None
311
+ keys : str | list[str], optional
312
312
Names of columns to sort by.
313
313
If `None`, sort by all columns.
314
314
ascending : Sequence[bool] or bool
@@ -801,10 +801,16 @@ def is_nan(self) -> DataFrame:
801
801
"""
802
802
...
803
803
804
- def unique_indices (self , keys : Sequence [str ], * , skip_nulls : bool = True ) -> Column [int ]:
804
+ def unique_indices (self , keys : str | list [str ] | None = None , * , skip_nulls : bool = True ) -> Column [int ]:
805
805
"""
806
806
Return indices corresponding to unique values across selected columns.
807
807
808
+ Parameters
809
+ ----------
810
+ keys : str | list[str], optional
811
+ Column names to consider when finding unique values.
812
+ If `None`, all columns are considered.
813
+
808
814
Returns
809
815
-------
810
816
Column[int]
0 commit comments