I have a question concerning reading bits and pieces of a csv file. When just reading the file using
pd.read_csv(path,sep=';',na_values=[''],thousands='.',decimal=',',date_parser=[0])
I get:
EUR 1Y 2Y 3Y
0 2013-09-25 0,198 0,307 0,485
1 2013-09-26 0,204 0,318 0,497
2 2013-09-27 0,204 0,306 0,487
3 2013-09-28 0,204 0,306 0,487
4 USD 1Y 2Y 3Y
5 2013-09-25 0,462 0,571 0,749
6 2013-09-26 0,468 0,582 0,761
7 2013-09-27 0,468 0,57 0,751
8 2013-09-28 0,468 0,57 0,751
As you can see, the data is arranged date-wise, and each data set is in chunks after one another (in this case the USD-data comes straight after the EUR-data). The currency-label tricks up things a bit, and the data becomes one single data frame.
What I would like to have are two separate data frames, as
EUR 1Y 2Y 3Y
0 2013-09-25 0,198 0,307 0,485
1 2013-09-26 0,204 0,318 0,497
2 2013-09-27 0,204 0,306 0,487
3 2013-09-28 0,204 0,306 0,487
USD 1Y 2Y 3Y
0 2013-09-25 0,462 0,571 0,749
1 2013-09-26 0,468 0,582 0,761
2 2013-09-27 0,468 0,57 0,751
3 2013-09-28 0,468 0,57 0,751
That is, I would like to separate each currency data set from one another.
Any suggestions?