title: How to identify empty strings in Pandas series
body: <p>I have a dataframe and I want to populate 'column3' with value of column 'name' if column 'gender' is empty, else with value of column 'gender'</p>
  
  <pre><code>vals = {
      'name' : ['n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7'],
      'gender' : ['', '', '', 'f',  'f', 'c', 'c'],
      'age' : [39, 12, 27, 13, 36, 29, 10]
  }
  df4 = pd.DataFrame(vals)
  df4['column3'] = df4['name'] if len(df4['gender']) == 0 else df4['gender']
  </code></pre>
  
  <p>The result is that column3 has only values taken from 'gender'.
  I've tried the following statements:</p>
  
  <pre><code>df4['column3'] = np.where(df4['gender'].empty, df4['name'],df4['gender'])
  df4['column3'] = df4['name'] if df4['gender'].empty else df4['gender']
  </code></pre>
  
  <p>Same results..so I am thinking that my code is not able to identify an empty string in a Python Dataframe. What am I missing?</p>