0

My dataset is in an odd format and I have no clue how to fix it (I have tried and read a lot of similar questions but to no avail). Each column is a firm name (e.g. AAPL, AMZN, FB) and the first row is a list of each category of data. Basically each column has a firm name, then the entry below is a code (e.g. trading volume, market value, price), and then the respective data with an index of dates (monthly). How can I appropriately manipulate this so I can filter the data for a panel regression? Example: using each column of trading volume regressed on each column of earnings per share?

Adam K
  • 1

1 Answers1

0

It sounds like you may need to learn how to select columns from Pandas MultiIndex, and perhaps how to create a MultiIndex. You may also benefit from learning how to reshape your data in order to run your panel regression.

If you provide a small sample of your data with the correct format, it will be easier to provide more specifics.

Nathaniel
  • 3,230
  • 11
  • 18