I have a df, and I want to run something like:
subsetdf= df.loc[(df['Item_Desc'].str.contains('X')==True) or \
(df['Item_Desc'].str.contains('Y')==True ),:]
that selects all rows that have the Item Desc column a substring of "X" or "Y".
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I get the error when I run that. Any help?