Read a collection of matrices from .csv

48 views Asked by At

I am a beginner in Pandas. I am having trouble to find a way to read data from a csv file and find the proper data structure to contain it.

I have one .csv file. My data is in the following format

'Name1', {
a1, a2, a3
b1, b2, b3
...
}
'Name2', {
a1, a2, a3
b1, b2, b3
...
}
...

and I would like to read it to a colection of dataframes. I don't know how to read it.

I have tried basic staff like read_csv but I get an error. If I call the function with nrows =2 for exemple it loads it. But it interpret { as data. It dysplays the data as

*blank* Name1 {
a1      a2    a3
b1      b2    b3

It doesn't work for nrows >2 thought. I have seached on the documentation and on the web for alternatives but I couldn't find anything that seemed appliable to my case.

Any suggestions?

All hints are more than welcome. As I said I am a beginner so I might be missing references to know what to look for to find the solution.

Thanks in advance.

0

There are 0 answers