title: Group by in pandas dataframe and unioning a numpy array column
body: <p>I have a CSV file where one of the columns looks like a numpy array. The first few lines look like the following</p>
  
  <pre><code>first,second,third
  170.0,2,[19 234 376]
  170.0,3,[19 23 23]
  162.0,4,[1 2 3]
  162.0,5,[1 3 4]
  </code></pre>
  
  <p>When I load the this CSV with pandas data frame and using the following code</p>
  
  <pre><code>data = pd.read_csv('myfile.csv', converters = {'first': np.float64, 'second': np.int64, 'third': np.array})
  </code></pre>
  
  <p>Now, I want to group by based on the 'first' column and union the 'third' column. So after doing this my dataframe should look like </p>
  
  <pre><code>170.0, [19 23 234 376]
  162.0, [1 2 3 4]
  </code></pre>
  
  <p>How do I achieve this? I tried multiple ways like the following and nothing seems to help achieve this goal. </p>
  
  <pre><code>group_data = data.groupby('first')
  group_data['third'].apply(lambda x: np.unique(np.concatenate(x)))
  </code></pre>