title: Pandas filter not working as expected
body: <p>I have a pandas dataframe in which I need to remove certain rows that do not match a regex pattern in a given column. The column I need to run the regex against is formatted: <code>lastname,firstname</code>, and I want to remove all rows in that column that do not match that format. I am trying to use the pandas filter method, and I have tried using the command this way:<br>
  <code>edited_df = idf['Name'].filter(regex="([aA-zZ]*)([,]{1})([aA-zZ]*)")</code> and<br>
  <code>edited_df = idf['Name'].filter(regex="/([aA-zZ]*)([,]{1})([aA-zZ]*)/")</code>.<br>
  However, doing that produces this error:<br>
  <code>TypeError: can't use a string pattern on a bytes-like object</code><br>
  The result of <code>type(idf['Name'])</code> is a series, and each entry in it is a string, per <code>type(idf['CIO'][1])</code>.<br>
  I saw this question <a href="https://stackoverflow.com/questions/23323974/pandas-filter-rows">Pandas filter rows</a>, but I want to make my program more modular and not have to adjust a list of names every time there is a name added.<br>
  I tested my regex at <a href="http://pythex.org/" rel="nofollow noreferrer">http://pythex.org/</a> with test strings and it matched as expected, so I am assuming I am using the filter method incorrectly. Any help is greatly appreciated.<br>
  Also, a less important matter is if it is possible to access the capture groups created from the regex in the modified dataframe.</p>