Dear all,
Hi, I am downloading mutual fund data from Morningstar Excel API and the structure is 'weird' in the sense that each row of observation has its own header. A sample is,
2010-09-30 2012-12-31 2013-12-27
FOUSA0885N 0.09 0.03 0.11
2009-06-30 2009-12-31 2010-09-30 2010-12-31
FOUSA0885O 0.01 0.04 0.01 0.02
The first column is the fund id. The following columns show its dividends whenever data exists. The header is the time at which the dividend applies and is row-specific. Rather than the row-specific dates, I want to make a unifying header. That is, I want something like
2009-06-30 2009-12-31 2010-09-30 2010-12-31 2012-12-31 2013-12-27
FOUSA0885N 0.09 0.03 0.11
FOUSA0885O 0.01 0.04 0.01 0.02
So essentially, I want a union of each row-specific header and make that a unifying header and then fill in each cell whenever the data point existed for that date. I'd be most thankful for any and all suggestions. Thank you!
Best,
John
Bookmarks