Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecd40e4 commit c5d8b04Copy full SHA for c5d8b04
txtToCsv.py
@@ -3,7 +3,7 @@
3
from datetime import datetime
4
5
# 処理ファイル名
6
-FROM_FILE = "testADB_touchMesocket1_log_2020.05.07.txt"
+FROM_FILE = 'testADB_touchMesocket1_log_2020.05.07.txt'
7
# 抽出したいデータの設備名
8
DEVICE_CODE = '/dev/input/event4'
9
# 処理ファイルに項目名のindex
@@ -145,7 +145,7 @@ def data_convert(data_json, keys):
145
for col in COLUMNS:
146
if col['name'] == USER_COLUMN_NAME and j == 0:
147
header.append(USER_COLUMN_NAME)
148
- else:
+ elif col['name'] != USER_COLUMN_NAME:
149
header.append(col['name'].replace('n', str(j + 1)))
150
result_header.append(','.join(header) + '\n')
151
return result_header + result_data
0 commit comments