Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5d8b04

Browse files
出力ファイルのヘッダを修正
1 parent ecd40e4 commit c5d8b04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

txtToCsv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from datetime import datetime
44

55
# 処理ファイル名
6-
FROM_FILE = "testADB_touchMesocket1_log_2020.05.07.txt"
6+
FROM_FILE = 'testADB_touchMesocket1_log_2020.05.07.txt'
77
# 抽出したいデータの設備名
88
DEVICE_CODE = '/dev/input/event4'
99
# 処理ファイルに項目名のindex
@@ -145,7 +145,7 @@ def data_convert(data_json, keys):
145145
for col in COLUMNS:
146146
if col['name'] == USER_COLUMN_NAME and j == 0:
147147
header.append(USER_COLUMN_NAME)
148-
else:
148+
elif col['name'] != USER_COLUMN_NAME:
149149
header.append(col['name'].replace('n', str(j + 1)))
150150
result_header.append(','.join(header) + '\n')
151151
return result_header + result_data

0 commit comments

Comments
 (0)