title: Concat column values based on condition
body: <p>This code : </p>
  
  <pre><code>import numpy as np
  import pandas as pd
  
  df = pd.DataFrame(['a1', 'a2', 'stop', 'a4', 'a4', 'a5', 'stop', 'a3'],
                    columns=['c'])
  </code></pre>
  
  <p>renders: </p>
  
  <pre><code>      c
  0    a1
  1    a2
  2  stop
  3    a4
  4    a4
  5    a5
  6  stop
  7    a3
  </code></pre>
  
  <p>I'm attempting to produce the following dataframe where values in a column are concatenated until 'stop' value is encountered : </p>
  
  <pre><code>columns = ['c1' , 'c2']
  data = np.array([['a1, a2','stop'] , ['a4, a4, a5','stop']])
  df = pd.DataFrame(data, columns=columns)
  df
  
             c1    c2
  0      a1, a2  stop
  1  a4, a4, a5  stop
  </code></pre>
  
  <p>Is this a valid approach, filter the rows where column value is 'stop': </p>
  
  <pre><code>df[df['c'] == 'stop']
  </code></pre>
  
  <p>then access the previous rows ?</p>