質問編集履歴
2
プログラムの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,11 +18,11 @@
|
|
18
18
|
|
19
19
|
プログラムは以下に貼っておきます。エラーはでていない状況です。
|
20
20
|
|
21
|
-
for文は2つ書いてはだめなのでしょうか?
|
22
|
-
|
23
21
|
|
24
22
|
|
25
23
|
```python
|
24
|
+
|
25
|
+
import json
|
26
26
|
|
27
27
|
import pandas as pd
|
28
28
|
|
@@ -54,13 +54,15 @@
|
|
54
54
|
|
55
55
|
list6 = []
|
56
56
|
|
57
|
-
list
|
57
|
+
list8 = []
|
58
58
|
|
59
|
-
|
59
|
+
|
60
60
|
|
61
61
|
d = open('2k1shugou.csv', 'w', newline = '')
|
62
62
|
|
63
63
|
writer = csv.writer(d)
|
64
|
+
|
65
|
+
|
64
66
|
|
65
67
|
|
66
68
|
|
@@ -76,13 +78,25 @@
|
|
76
78
|
|
77
79
|
dr = data.iloc[0,2]
|
78
80
|
|
81
|
+
df1 = data.iloc[1,0]
|
82
|
+
|
83
|
+
dt1 = data.iloc[1,1]
|
84
|
+
|
85
|
+
dr1 = data.iloc[1,2]
|
86
|
+
|
79
87
|
list.append(df)
|
80
88
|
|
81
89
|
list2.append(dt)
|
82
90
|
|
83
91
|
list4.append(dr)
|
84
92
|
|
93
|
+
list5.append(df1)
|
94
|
+
|
95
|
+
list6.append(dt1)
|
96
|
+
|
97
|
+
list8.append(dr1)
|
98
|
+
|
85
|
-
list3 = list + list2 + list4
|
99
|
+
list3 = list + list2 + list4 + list5 + list6 + list8
|
86
100
|
|
87
101
|
writer.writerow(list3)
|
88
102
|
|
@@ -91,30 +105,6 @@
|
|
91
105
|
del list2[0]
|
92
106
|
|
93
107
|
del list4[0]
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
for a in files:
|
98
|
-
|
99
|
-
with open(a) as ab:
|
100
|
-
|
101
|
-
data2 = pd.read_csv(ab)
|
102
|
-
|
103
|
-
abc = data2.iloc[1,0]
|
104
|
-
|
105
|
-
abd = data2.iloc[1,1]
|
106
|
-
|
107
|
-
abf = data2.iloc[1,2]
|
108
|
-
|
109
|
-
list5.append(abc)
|
110
|
-
|
111
|
-
list6.append(abd)
|
112
|
-
|
113
|
-
list8.append(abf)
|
114
|
-
|
115
|
-
list7 = list5 + list6 + list8
|
116
|
-
|
117
|
-
writer.writerow(list7)
|
118
108
|
|
119
109
|
del list5[0]
|
120
110
|
|
1
プログラムの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,11 +100,11 @@
|
|
100
100
|
|
101
101
|
data2 = pd.read_csv(ab)
|
102
102
|
|
103
|
-
abc = data.iloc[1,0]
|
103
|
+
abc = data2.iloc[1,0]
|
104
104
|
|
105
|
-
abd = data.iloc[1,1]
|
105
|
+
abd = data2.iloc[1,1]
|
106
106
|
|
107
|
-
abf = data.iloc[1,2]
|
107
|
+
abf = data2.iloc[1,2]
|
108
108
|
|
109
109
|
list5.append(abc)
|
110
110
|
|