- Its size is (8, 8415).
- This csv file was made from pandas multi-index dataframe (python).
- Its columns are [codes X financial items].
How can I use this csv file to use its year(2014, 2015, ....) as index and codesXfinancial items as multi columns?
CodePudding user response:
What kind of output you want is unclear. There are not many libraries to imitate pandas in C . A very messy, convoluted and inelegant way of doing it is declaring a structure and then put it into a list. Something like,
struct dataframe{
double data;
int year;
int code;
char item[]; //or you can use "string item;"
}
Make a list of this structure either by a custom class or C native "list" class. If you can provide a more detailed explanation of what kind of data structure you want in the program or what do you want to do with it, I would try to provide a better solution.