回答編集履歴
1
文法の修正
test
CHANGED
@@ -1 +1,31 @@
|
|
1
1
|
read csvとopenpyxlを使って解決しました!
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```ここに言語を入力
|
6
|
+
|
7
|
+
import pandas as pd
|
8
|
+
|
9
|
+
import openpyxl as op
|
10
|
+
|
11
|
+
from openpyxl import load_workbook
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
df=pd.read_csv('練習2.csv',encoding='utf-8' )
|
16
|
+
|
17
|
+
wb = load_workbook('練習1.xlsx')
|
18
|
+
|
19
|
+
ws = wb.active
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
for i in range(0,len(df_3)):
|
24
|
+
|
25
|
+
ws.cell(row=i+2,column=1).value=df.iloc[i,2]
|
26
|
+
|
27
|
+
wb.save('練習1.xlsx')
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```
|