我是新的Python,希望在csv数据中更改文本数据,其中列包含id,序列,createdAt和createdBy?
文本文件
[{"id":1,"sequence":14,"createdAt":"2021-03-04xx:x:x","createdBy":"xxxxxxxxxxxx"}},
{"id":2,"sequence":14,"createdAt":"2021-03-04Txx:x:x","createdBy":"xxxxxxxxxxxx"}},
{"id":3,"sequence":14,"createdAt":"2021-03-04Txx:x:x","createdBy":"xxxxxxxxxxxx"}}]
Input Data Set显示为JSON结构我推荐csvkithttps://csvkit.readthedocs.io/en/latest/index.html
具体来说,模块in2csv
-非常强大
或者-使用pandas read_json -这将使您能够加载到DataFrame