I am pulling in a csv string and need to parse it into a pd dataframe. Example string:
b'date,"total revenue"\n2018-06-19,12.65\n2018-06-20,3.90\n2018-06-21,6.16\n2018-06-22,9.06\n2018-06-23,1.30\n2018-06-24,1.88\n2018-06-25,4.20\n2018-06-26,2.46\n2018-06-27,2.38\n2018-06-28,1.06\n`
How can I convert this string into a 2 column pandas dataframe? Many thanks
I tried the following:
df = pd.DataFrame(list(reader(str(my_string))))
But the output is all skewed:
0 1
0 b None
1 ' None
2 d None
3 a None
4 t None
5 e None
6
7 total revenue None
8 \ None