I have a dataset in a form of:
A B C D label
6 2 6 8 0
2 5 3 6 0
4 3 4 9 1
5 7 5 5 1
6 4 5 8 0
in which each row is a label with a unique value, and that unique value is repeating after some lines, so there are 7 labels to 7000 lines if I do df.loc[df['label'] == 0] it will grab all the values of 0 labeled rows, but I want to extract the values according to the first label set of 0, if there are first 10 rows labeled as 0, then it just brings them not others label 0 in the data frame