我有一份清单。这是它的一个示例。
[[], ['1', 'Anthony Taylor', '6', '11.17', '0.68', '0.17', '1.83', '11', '0.17', '1'], ['2', 'Jonathan Moss', '4', '12.75', '0.73', '0.00', '2.00', '8', '0.00', '0'], ['3', 'Martin Atkinson', '3', '11.00', '0.69', '0.67', '1.67', '5', '0.00', '0'], ['4', 'Graham Scott', '3', '10.00', '0.67', '0.00', '0.33', '1', '0.00', '0'], ['5', 'Chris Kavanagh', '3', '10.33', '0.74', '0.00', '1.67', '5', '0.00', '0'], ['6', 'Michael Oliver', '2', '12.00', '0.62', '1.00', '2.00', '4', '0.00', '0']
如何从中创建一个类似于此格式的 Pandas DataFrame(每一行都有一个单独的名称)?
['1', 'Anthony Taylor', '6', '11.17', '0.68', '0.17', '1.83', '11', '0.17', '1']
['2', 'Jonathan Moss', '4', '12.75', '0.73', '0.00', '2.00', '8', '0.00', '0']
['3', 'Martin Atkinson', '3', '11.00', '0.69', '0.67', '1.67', '5', '0.00', '0']
['4', 'Graham Scott', '3', '10.00', '0.67', '0.00', '0.33', '1', '0.00', '0']
['5', 'Chris Kavanagh', '3', '10.33', '0.74', '0.00', '1.67', '5', '0.00', '0']
['6', 'Michael Oliver', '2', '12.00', '0.62', '1.00', '2.00', '4', '0.00', '0']
['7', 'Paul Tierney', '2', '12.50', '0.66', '0.00', '2.50', '5', '0.00', '0']
['8', 'Mike Dean', '2', '14.50', '0.73', '0.50', '3.00', '6', '0.00', '0']
['9', 'Andre Marriner', '2', '8.50', '0.53', '0.00', '2.00', '4', '0.00', '0']
['10', 'Kevin Friend', '2', '9.50', '0.50', '0.00', '3.00', '6', '0.00', '0']
['11', 'Craig Pawson', '1', '9.00', '0.45', '0.00', '1.00', '1', '0.00', '0']
['12', 'Stuart Attwell', '1', '9.00', '0.75', '0.00', '2.00', '2', '0.00', '0']
['13', 'Lee Probert', '1', '11.00', '0.73', '0.00', '0.00', '0', '0.00', '0']
['', 'Total / Average', '32', '11.09', '0.66', '0.19', '1.81', '58', '0.03', '1']
在我的研究过程中,这个答案对我有所帮助,但它仍然只将所有内容放入一个列中,而我希望特定列表的每个元素都有一个单独的列。有什么方法可以实现这一目标吗?
手掌心
心有法竹
相关分类