title: How to combine multiple rows into a single row with pandas
body: <p>I need to combine multiple rows into a single row, that would be simple concat with space</p>
  
  <pre><code>    View of my dataframe:
    tempx        value
  0  picture1         1.5
  1  picture555       1.5
  2  picture255       1.5
  3  picture365       1.5
  4  picture112       1.5
  </code></pre>
  
  <p>I want the dataframe to be converted like this: (space separated)
  tempx values</p>
  
  <pre><code>  Expected output:
    tempx                                                       value
    0     picture1 picture555 picture255 picture365 picture112  1.5
  
    or
    as a python dict
    {1.5:{picture1 picture555 picture255 picture365 picture112}}
  </code></pre>
  
  <p>What I have tried :</p>
  
  <pre><code> df_test['tempx']=df_test['tempx'].str.cat(sep=' ')
  </code></pre>
  
  <p>this works but it combines the rows in all the columns like this:</p>
  
  <pre><code>      tempx        value
  0  picture1 picture555 picture255 picture365 picture112 1.5
  1  picture1 picture555 picture255 picture365 picture112 1.5
  2  picture1 picture555 picture255 picture365 picture112 1.5
  3  picture1 picture555 picture255 picture365 picture112 1.5
  4  picture1 picture555 picture255 picture365 picture112 1.5
  </code></pre>
  
  <p>Is there any elegant solution?</p>