Reputation: 969
All,
I have a list output as below and i would like to convert it to a DF.
attrb = [['nn', 'xx', 'yy'], ['aa', 'vv', 'bb'], ['cc', 'gg', 'hh'], ['jj', 'kk', 'uu'], ['ee', 'ww', 'qq'], ['tt', 'mm', 'ss'], ['tt', 'gg', 'll'], ['aa', 'qq', 'tt']]
as below
0 1 2 3 4 5 6 7
nn aa cc jj ee tt tt aa
xx vv gg kk ww mm gg qq
yy bb hh uu qq ss ll tt
i have tried the below but this makes it a 3x8 matrix
cf = pd.DataFrame(attrb)
print(cf)
Upvotes: 2
Views: 138