123456789101112131415161718192021222324 |
- """
- 生成预测数据, 3月14日 和 3月17日的小时级数据
- 3月18日至 3月21日的daily 数据
- """
- import os
- import json
- from functions import generate_hourly_strings
- target_string_list = generate_hourly_strings(
- start_date="2024031400", end_date="2024031723"
- )
- path = "temp_data/data"
- L = []
- for file in target_string_list:
- json_path = os.path.join(path, file + ".json")
- print(json_path)
- with open(json_path, encoding="utf-8") as f:
- data = json.loads(f.read())
- for obj in data:
- L.append(obj)
- with open("prid_data/train_0314_0317.json", "w", encoding="utf-8") as f:
- f.write(json.dumps(L, ensure_ascii=False))
|