Shorting the columns of data frame under a specific group : <p>I have a data frame from which the columns has this format:</p>

<pre><code>name             stock1 stock2 value1 value2
stoc_from_csv    Google Yahoo   50      21
stock up to date Opel   Tayoota 42      44
</code></pre>

<p>How can I reshape the column to have all with 1 the one next to other, same for 2 etc. An example of output:</p>

<pre><code>    name             stock1 value1 stock2 value2
    stoc_from_csv    Google 50      Yahoo   21
    stock up to date Opel   42      Tayoota 44
</code></pre>
