| | |
| | | writer.writerow(row) |
| | | |
| | | |
| | | def parse_transaction(day, save=True): |
| | | def parse_transaction(day, save=True, parse_all=False): |
| | | target_codes = __get_target_codes(day) |
| | | base_path = f"/home/userzjj/ftp/{day}" |
| | | fdatas = [] |
| | |
| | | writer = csv.writer(csvfile) |
| | | # 逐行写入数据 |
| | | for row in csv_reader: |
| | | if row[1] not in target_codes: |
| | | if row[1] not in target_codes and not parse_all: |
| | | continue |
| | | # 将文件写入到文本 |
| | | if save: |
| | |
| | | l2_data_manager_dict = {} |
| | | # 解析数据 |
| | | __start_time = time.time() |
| | | transaction_data = parse_transaction(day) |
| | | transaction_data = parse_transaction(day, parse_all=True) |
| | | print("*******Transaction 读取完毕", len(transaction_data), "耗时", int(time.time() - __start_time)) |
| | | __start_time = time.time() |
| | | ngtstick_data = parse_ngtstick(day) |