title: Pandas Data Frame extracting data into new column while skipping blank values
body: <p>I have a function that works successfully to extract data from inside a dataframe when it looks like this:</p>
  
  <pre><code>company                            created_at              notes
  {'id': 'eb904b4b', 'name': 'B'}    2018-06-04T13:57:02Z    Digging Holes
  {'id': 'da2dc806', 'name': 'K'}    2018-06-04T13:57:02Z    Drinking Tea
  {'id': 'eb904b4b', 'name': 'B'}    2018-05-11T08:52:23Z    Cbales
  {'id': '3d38dcb7', 'name': 'B'}    2018-05-11T08:52:23Z    Digg
  </code></pre>
  
  <p>To give this:</p>
  
  <pre><code>company_id  company_name    created_at              notes
  eb904b4b    B               2018-06-04T13:57:02Z    Digging Holes
  da2dc806    K               2018-06-04T13:57:02Z    Drinking Tea
  eb904b4b    B               2018-05-11T08:52:23Z    Cbales
  3d38dcb7    B               2018-05-11T08:52:23Z    Digg
  </code></pre>
  
  <p>However if the column company has a blank value then the function fails as it expects a value. I cant figure out how to make my code skip the blanks and carry on...</p>
  
  <p>E.g:</p>
  
  <pre><code>company                            created_at              notes
  {'id': 'eb904b4b', 'name': 'B'}    2018-06-04T13:57:02Z    Digging Holes
                                     2018-06-04T13:57:02Z    Drinking Tea
  {'id': 'eb904b4b', 'name': 'B'}    2018-05-11T08:52:23Z    Cbales
  {'id': '3d38dcb7', 'name': 'B'}    2018-05-11T08:52:23Z    Digg
  </code></pre>
  
  <p>The code that works for the full frame is as so:</p>
  
  <pre><code>def shallow_extract(column, df_parent):
      temp_frame = pandas.DataFrame(x for x in df_parent[column])
      temp_frame.columns = [f"{column}_{str(col)}" for col in temp_frame.columns]
      return pandas.concat([df_parent.drop([column], axis=1), temp_frame.apply(pandas.Series)], axis=1)
  </code></pre>
  
  <p>EDIT: Dropping the rows is not an option as the other fields can contain data needed. The code also needs to be able to accept multiple dataframes with differing positions and names of columns to extract (as given by the second parameter in the function)</p>