以 JSON 格式导出
Exporting in JSON Format
我可以使用以下方法将我的数据导出为 CSV:
df.reset_index().to_csv('MYDATASET.csv')
如何以 JSON 数组格式导出结果?
你可以使用 orient='records'
打印df.reset_index().to_json(方向='records')
我可以使用以下方法将我的数据导出为 CSV:
df.reset_index().to_csv('MYDATASET.csv')
如何以 JSON 数组格式导出结果?
你可以使用 orient='records'
打印df.reset_index().to_json(方向='records')