Я хотел выбрать только те строки, которые удовлетворяют моему условию.
options = ['apple', 'banana','cat','dog']
#selecting rows based on condition
rslt_df = data[(data['Animal'] == "All") & data['Category'].isin(options)]
print(rslt_df)
Но я получаю эту ошибку.
#selecting rows based on condition
-----> rslt_df = data[(data['Animal'] == "All") & data['Category'].isin(options)]
print(rslt_df)
TypeError: invalid type comparison