質問編集履歴
2
一部関数を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,8 +13,6 @@
|
|
13
13
|
len3 = _id_choice(fr1,f2,3,4) ⇦3、4の引数
|
14
14
|
|
15
15
|
```
|
16
|
-
|
17
|
-
|
18
16
|
|
19
17
|
```
|
20
18
|
|
@@ -84,6 +82,38 @@
|
|
84
82
|
|
85
83
|
|
86
84
|
|
85
|
+
def _load_file(file0,file1):
|
86
|
+
|
87
|
+
f0 = open(file0, "r", encoding="utf-8", errors="", newline="")
|
88
|
+
|
89
|
+
f1 = open(file1, "r", encoding="utf-8", errors="", newline="")
|
90
|
+
|
91
|
+
fr0 = csv.reader(f0, delimiter=",", doublequote=True, lineterminator="\r\n", quotechar='"', skipinitialspace=True)
|
92
|
+
|
93
|
+
fr1 = csv.reader(f1, delimiter=",", doublequote=True, lineterminator="\r\n", quotechar='"', skipinitialspace=True)
|
94
|
+
|
95
|
+
return f0, f1, fr0, fr1
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
####################################
|
100
|
+
|
101
|
+
def _replace(x):
|
102
|
+
|
103
|
+
y = x.replace("\n", " ")
|
104
|
+
|
105
|
+
y = y.replace("\r", " ")
|
106
|
+
|
107
|
+
y = y.replace("\t", " ") # error when input data have tabs
|
108
|
+
|
109
|
+
y = y.replace("\v", " ") # vertical tab
|
110
|
+
|
111
|
+
y = y.replace('"', ' ')
|
112
|
+
|
113
|
+
return y
|
114
|
+
|
115
|
+
|
116
|
+
|
87
117
|
def _id_choice(fr,f2,ind_row,ind_row2):
|
88
118
|
|
89
119
|
len0 = 0
|
1
CSVのカラム情報を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -133,3 +133,11 @@
|
|
133
133
|
return len0
|
134
134
|
|
135
135
|
```
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
csv(どちらのcsvも同じ構成になります)
|
140
|
+
|
141
|
+
ID/フォルダーID/コンポーネント名/メッセージ/遷移元ID/選択肢/遷移人数/遷移率/CV/OID
|
142
|
+
|
143
|
+
```
|