我得到了一些数据,我需要将其转换为 csv 文件。我不是编码员,但我认为 python 可以帮助我处理这些字典/元组。
a = {
'page': '1',
'records': 984,
'rows': [{'cell': ['2012000000885',
'A. B. OLIVEIRA - ME',
'10\\/08\\/2012',
'2.200,00',
'0,00',
'0,00'],
'id': '2012000000885;02070712000102;2012;4'},
{'cell': ['2012000000440',
'A. C SILVA E CIA LTDA',
'26\\/04\\/2012',
'600,00',
'600,00',
'600,00'],
'id': '2012000000440;02070712000102;2012;4'},
{'cell': ['2012000000104',
'ADAILTON PEREIRA DE OLIVEIRA',
'27\\/01\\/2012',
'100,00',
'100,00',
'100,00'],
'id': '2012000000104;02070712000102;2012;4'},
{'cell': ['2012000000261',
'ADAILTON PEREIRA DE OLIVEIRA',
'01\\/03\\/2012',
'200,00',
'200,00',
'200,00'],
'id': '2012000000261;02070712000102;2012;4'},
{'cell': ['2012000000360',
'ADAILTON PEREIRA DE OLIVEIRA',
'28\\/03\\/2012',
'200,00',
'200,00',
'200,00'],
'id': '2012000000360;02070712000102;2012;4'}],
'total': 1}
我只对“行”感兴趣,我需要单独的“Id”和“单元格”将它们导入 csv 文件。预先感谢您的任何帮助。
罗杰里奥·马里尼奥