0

I have an error

**'ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'**

when I am attempting to filter by my code :

(xls[xls['DisabilityFriendly'] == 'приспособлен для всех групп инвалидов']) & (xls[xls['Paid'] == 'бесплатно'])

Can anyone explain why?

Umar.H
  • 22,559
  • 7
  • 39
  • 74
Dmitry Korpachev
  • 77
  • 1
  • 2
  • 5
  • check [this](https://stackoverflow.com/questions/48978550/pandas-filtering-multiple-conditions) – anky Oct 28 '18 at 13:41

1 Answers1

0

Try this:

xls[(xls['DisabilityFriendly'] == 'приспособлен для всех групп инвалидов') & (xls['Paid'] == 'бесплатно')]

Look at where the brackets [] and () are.

Differences:

(xls[xls['DisabilityFriendly'] == 'приспособлен для всех групп инвалидов']) & (xls[xls['Paid'] == 'бесплатно'])
xls[(xls['DisabilityFriendly'] == 'приспособлен для всех групп инвалидов') & (xls['Paid'] == 'бесплатно')]
Alex
  • 6,610
  • 3
  • 20
  • 38