Skip to content

Tag: subset

Splitting a dataframe with many labels

I’m trying to split my data by different labels, like this: And this works fine for small amounts of numbers. However, I want to do this for many values. for example: This spits outs an error: ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). I&#8…