1

I'm trying to check the text element in a df column, to see if any part of that text is in a list of element

I tried this, but it seems I can't pass a list in the function

name=['park','school','hospital']

df['trip_pattern_txt'].str.contains(name)

unhashable type: 'list'

Taku_
  • 1,505
  • 3
  • 14
  • 22
QiuBie
  • 63
  • 4

0 Answers0