I'm trying to train a multiobject classificator. For that, I have my dataset info stored into a pandas DataFrame which currently looks like this:
|IMAGE_PATHS---|LABELS------------------------------------------|
|path_to_image1|[[c11 x11 y11 w11 h11],[c12 x12 y12 w12 h12]...]|
|path_to_image2|[[c21 x21 y21 w21 h21],[c22 x22 y22 w22 h22]...]|
|...
But having it this way it's not easy to play with it. For example, if I want to see all unicorns labeled in my images, I would need to iterate over all elements in each row and look for them. If this labels were DataFrames, I could easily filter them as df[df["label"] == "unicorn"].
So is there a way to easily create a DataFrame inside this DataFrame or some other cool trick out there?
list. Storing a DataFrame inside of a DataFrame doesn't really fix this. In this case you should probably consider reshaping your data, perhaps in a long format with aMultiIndexMultiIndex, thanks