You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dataset with column Class which takes one of categorical values like Dog, Cat etc...
I need to select a subset of the records with 5 records in each class.
I need the same but the subset has to be randomized.
This is how it looks like in IBIS (with randomization):
# Create a random column for orderingrandom_col=table.mutate(random_val=ibis.random())
# Define a window function partitioned by 'Class' and ordered by the random columnwindow=win.Window(partition_by='Class', order_by=random_col.random_val)
# Add a row number column based on the window functionranked_table=random_col.mutate(row_number=ibis.row_number().over(window))
The text was updated successfully, but these errors were encountered:
I have a dataset with column
Class
which takes one of categorical values like Dog, Cat etc...This is how it looks like in IBIS (with randomization):
The text was updated successfully, but these errors were encountered: