{:9_241:}
file是什么啊
{:10_245:}
{:9_227:}
我也处理过类似的,有点经验仅供参考,其实读取不慢,慢的是append和concat。
我采取的是循环读取,然后再concat。
加油
怎么解决的?
{:5_109:}
{:7_146:}
{:5_109:}
???
???
有钱人,加油
不知道啊{:10_266:}
{:7_146:}
路过进来学习,pandas优势在于数据处理(类似统计等),针对excel处理还是推荐openpyxl和xlwings
可以看看具体慢的是read还是concat
10个文件,能不能试试多线程去读呢,def concat_file():
with concurrent.futures.ThreadPoolExecutor() as executor:
# with concurrent.futures.ProcessPoolExecutor() as executor:
f_451 = executor.submit(read_txt,path_45_1,'45-1')
f_452 = executor.submit(read_txt,path_45_2, '45-2')
f_651 = executor.submit(read_txt,path_65_1, '65-1')
f_120 = executor.submit(read_txt,path_120, '120')
f_ws = executor.submit(read_txt,path_wenshui, '温水')
f_1501 = executor.submit(read_txt,path_150_1, '150-1')
f_1502 = executor.submit(read_txt,path_150_2, '150-2')
df_451 = f_451.result()
df_452 = f_452.result()
df_651 = f_651.result()
df_120 = f_120.result()
df_ws = f_ws.result()
df_1501 = f_1501.result()
df_1502 = f_1502.result()
df = pd.concat()
加油
{:10_254:}