递归Merge数据表
df = functools.reduce(
lambda left, right: pd.merge(left, right, how='left',on=['id','year']),
[maps, pp,pp_doy_rainDayCounts,pp_moy_rainZscore,modis_temp,pop,]
)
深复制
Import copy
copy.deepcopy(init_maps)
多进程
from concurrent.futures import ProcessPoolExecutor
length = len(filelist)
files_iter = iter(filelist)
processes = 1
parallelism = 1
with ProcessPoolExecutor() as executor:
chunksize = int(max(length / (processes * parallelism), 1))
executor.map(tf2pth_oneitem, files_iter, chunksize=chunksize)
标签:files,片段,right,chunksize,Python,代码,pp,iter,left
From: https://www.cnblogs.com/geoli/p/17834556.html