Pandas text matching like SQL’s LIKE?
You can use the Series method str.startswith (which takes a regex): In [11]: s = pd.Series([‘aa’, ‘ab’, ‘ca’, np.nan]) In [12]: s.str.startswith(‘a’, na=False) Out[12]: 0 True 1 True 2 False 3 False dtype: bool You can also do the same with str.contains (using a regex): In [13]: s.str.contains(‘^a’, na=False) Out[13]: 0 True 1 True 2 … Read more