I have two lists of equal size, one has the type of data (comes in succession):
types = ["vigi","vigi","fruits","fruits","fruits","nothing","nothing","nothing","nothing"]
The second list is about the data:
data = ["xx","tr","kl","ut","ew","uy","lp","eq","aq"]
from data list, I know that "xx","tr" are "vigi" and "kl","ut","ew" are "fruits" and so on.
What I need in each time divide the data into two datasets with:
data1 = data[indices for type "vigi"]
data2 = data[indices for the remaining (i.e. data for "fruits" and "nothing")]
A second time will have:
data1 = data[indices for type "fruits"]
data2 = data[indices for the remaining (i.e. data for "vigi" and "nothing")]
And so on ..
Any help with that please.