import json, csv, os
import pandas as pd
josns_root = 'jsons'
csvs_root = 'csvs'
list_josn = os.listdir(josns_root)
for bb in list_josn:
path_json_ = bb #请修改json路径
path_json = os.path.join(josns_root, path_json_)
path_csv_ = path_json_.split('.')[0]+'.csv'
path_csv = os.path.join(csvs_root, path_csv_)
if os.path.exists(path_csv):
print('路径已存在,请解决冲突', path_csv)
exit()
open(path_csv, 'w').close()
list_ = [200,50,51]
f = open(path_json, encoding='utf-8') # 载入json文件
setting = json.load(f)
data = setting['data']
data1 = data['imgs']
print(type(data1))
headers = ['fov_id', 'cells_fit', 'cells_P', 'cells_N']