vastorbit.VastColumn.distinct¶
- VastColumn.distinct(**kwargs) list¶
This function returns the distinct categories or unique values within a VastColumn. It’s a valuable method for exploring the unique elements within a column, which can be particularly useful when working with categorical data.
- Returns:
Distinct categories of the VastColumn.
- Return type:
list
Examples
For this example, let’s generate a dataset and compute all the distinct elements of a column:
import vastorbit as vo data = vo.VastFrame( { "x": [1, 2, 4, 9, 10, 15, 20, 22], "y": [1, 2, 1, 2, 1, 1, 2, 1], "z": [10, 12, 2, 1, 9, 8, 1, 3], } ) data["y"].distinct()
Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregatemethod.See also
VastColumn.aggregate(): Aggregations for a specific column.VastFrame.aggregate(): Aggregates for particular columns.