質問編集履歴
1
試したコードを入力
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,11 +34,25 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
import numpy as np
|
38
38
|
|
39
|
-
|
39
|
+
import pandas as pd
|
40
40
|
|
41
|
-
|
41
|
+
import glob
|
42
|
+
|
43
|
+
file_list=glob.glob("data/*.xlsx")
|
44
|
+
|
45
|
+
df=pd.DataFrame()
|
46
|
+
|
47
|
+
for file in file_list:
|
48
|
+
|
49
|
+
df2=pd.read_excel(file,parse_dates=True,index_col=0)
|
50
|
+
|
51
|
+
df2=df2.replace(np.nan,' ',regex=True)
|
52
|
+
|
53
|
+
df=pd.concat([df,df2])
|
54
|
+
|
55
|
+
df.to_excel('結合.xlsx')
|
42
56
|
|
43
57
|
|
44
58
|
|