I have a string in this format:
"A1","B1","C1","D1","E1","F1","G1","H1"\n"A2","B2","C2","D2","E2","F2" etc
where A to H are columns and the numbers refer to the rows.
I'm looking for the quickest way to create a pandas dataframe.
A long (in time to complete) approach I tried is to use:
df = pd.DataFrame()
for row in data:
reader = csv.reader(row)
mylist = []
for element in reader:
if element!=['','']:
mylist.append(element[0])
df2 = pd.DataFrame([mylist])
df = df.append(df2)
I'm looking for a quicker way.