File tree 1 file changed +21
-0
lines changed
spec/API_specification/dataframe_api
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -430,3 +430,24 @@ def isnan(self) -> Column:
430
430
Does *not* include 'missing' or 'null' entries.
431
431
In particular, does not check for `np.timedelta64('NaT')`.
432
432
"""
433
+
434
+ def unique_indices (self , * , skip_nulls : bool = True ) -> Column [int ]:
435
+ """
436
+ Return indices corresponding to unique values in Column.
437
+
438
+ Returns
439
+ -------
440
+ Column[int]
441
+ Indices corresponding to unique values.
442
+
443
+ Notes
444
+ -----
445
+ There are no ordering guarantees. In particular, if there are multiple
446
+ indices corresponding to the same unique value, there is no guarantee
447
+ about which one will appear in the result.
448
+ If the original Column contains multiple `'NaN'` values, then
449
+ only a single index corresponding to those values should be returned.
450
+ Likewise for null values (if ``skip_nulls=False``).
451
+ To get the unique values, you can do ``col.get_rows(col.unique_indices())``.
452
+ """
453
+ ...
You can’t perform that action at this time.
0 commit comments