title: How to extract status in full name in pd.Dataframe column?
body: <p>I have dataset. Here is the column of 'Name':</p>
  <pre><code> 0                                Braund, Mr. Owen Harris
  1      Cumings, Mrs. John Bradley (Florence Briggs Th...
  2                                 Heikkinen, Miss. Laina
  3           Futrelle, Mrs. Jacques Heath (Lily May Peel)
  4                               Allen, Mr. William Henry
                               ...                        
  151                    Pears, Mrs. Thomas (Edith Wearne)
  152                                     Meo, Mr. Alfonzo
  153                      van Billiard, Mr. Austin Blyler
  154                                Olsen, Mr. Ole Martin
  155                          Williams, Mr. Charles Duane
  </code></pre>
  <p>and need to extract first name, status, and second name. When I try this on simple string, its ok:</p>
  <pre><code>full_name=&quot;Braund, Mr. Owen Harris&quot;
  first_name=full_name.split(',')[0]
  second_name=full_name.split('.')[1]
  print('First name:',first_name) 
  print('Second name:',second_name)
  status = full_name.replace(first_name, '').replace(',','').split('.')[0]
  print('Status:',status)
  
  &gt;First name: Braund
  &gt;Second name:  Owen Harris
  &gt;Status:  Mr
  </code></pre>
  <p>But after trying to do this with pandas, I fail with the status:</p>
  <pre><code>df['first_Name'] = df['Name'].str.split(',').str.get(0) #its ok, worsk well
  </code></pre>
  <p>But after this:</p>
  <pre><code>status= df['Name'].str.replace(df['first_Name'], '').replace(',','').split('.').str.get(0)
  </code></pre>
  <p>I get a mistake:</p>
  <pre><code>&gt;&gt;TypeError: 'Series' objects are mutable, thus they cannot be hashed
  </code></pre>
  <p>What are possible solutions?</p>
  <p><strong>Edit:Thanks for the answers and extract columns. I do</strong></p>
  <pre><code>def extract_name_data(row):
      
      row.str.extract('(?P&lt;first_name&gt;[^,]+), (?P&lt;status&gt;\w+.) (?P&lt;second_name&gt;[^(]+\w) ?')  
      last_name = row['second_name'] 
      title = row['status']     
      first_name = row['first_name'] 
      return first_name, second_name, status
  </code></pre>
  <p>and get</p>
  <pre><code>AttributeError: 'str' object has no attribute 'str'
  </code></pre>
  <p>What can be done? Row is meaned to be df['Name']</p>