How to limit columns while creating df from list of tuples?
Expected Input:
data = [('a',11,111),
('b',22,222),
('c',33,333)]
Expected Output:
A B
0 a 11
1 b 22
2 c 33
I wrote:
pd.DataFrame([(x[0], x[1]) for x in data], columns=['A', 'B'])
BUT is there any more elegant way to do this?