From 4ff7910368b6a8642aa6c00a63e8aa8779f4264a Mon Sep 17 00:00:00 2001 From: HongCheng Date: Thu, 21 Mar 2024 16:07:18 +0900 Subject: [PATCH] Update process_merge.py --- datasets/processed/process_merge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datasets/processed/process_merge.py b/datasets/processed/process_merge.py index 6db4f92..9cb4265 100644 --- a/datasets/processed/process_merge.py +++ b/datasets/processed/process_merge.py @@ -1,7 +1,7 @@ import os import json -# 设置目录路径,这里假设你的JSON文件都在当前目录下的json_files文件夹中 +# 设置目录路径,这里假设你的JSON文件都在当前目录下的directory_path文件夹中 directory_path = './' # 初始化一个空列表,用于存储所有JSON文件的数据 @@ -26,9 +26,9 @@ for filename in os.listdir(directory_path): else: combined_list.append(data) -# 打印合并后的列表 +# 打印合并后的列表 very large and slow # print(combined_list) # 如果需要,可以将合并后的列表保存到一个新的JSON文件中 with open('combined_data.json', 'w', encoding='utf-8') as combined_json_file: - json.dump(combined_list, combined_json_file, ensure_ascii=False, indent=4) \ No newline at end of file + json.dump(combined_list, combined_json_file, ensure_ascii=False, indent=4)