Convert unicode from API Endpoint (csv) to csv or jason or pydataset

I made a HTTP request to a CSV API Endpoint. I used
response =,'','','','',header)

and the response received is of 'unicode type.

<type 'unicode'>

How can I convert it to a dataset?

It would be helpful to see what the response actually is.

But if it's a CSV, I would imagine it's just a long string with values separated by ',' and '\n' or similar to denote end of lines.

So you could split on '\n' to get the lines and then split on ',' to get the values.

But this is pure speculation unless we can see what the response actually is.


You can use Python's csv module to parse the CSV, then construct your dataset yourself:


It started off well, but I see this error

this helped.
No errors now.

Csv file import - Error: Cannot create PyString with non-byte value - #3 by PGriffith

I think I am set for now. I just need to convert it to dataset.