title: How do I manipulate the columns in my financial data
body: <p>I've a dataframe in csv for different stock options and their close/high/low/open etc. But the format of the data is a bit difficult to work with. When calculating the returns using the adjusted close value, I've to create a new df each time to drop the null values.</p>
  <p><a href="https://i.stack.imgur.com/L3iXC.png" rel="nofollow noreferrer">Original Data</a></p>
  <p>How do I convert it to the following format instead?</p>
  <p><a href="https://i.stack.imgur.com/PSzcp.png" rel="nofollow noreferrer">Converted data</a></p>