热门

最新

红包

立Flag

投票

同城

我的

发布
lmy0006
夏天勒
2 年前
truelmy0006

请问为什么会出现这种情况啊,是需要在本地下载原文件吗,但是Jupter中有一个score_raw的文件

码友杂谈区
CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
python 多进程存储返回值import warningsimport timefrom multiprocessing import Managerfrom multiprocessing.dummy import freeze_supportimport pandas as pdfrom multiprocessing.pool import Pooldef get_pool(tu): text = "djaiojeiwoiobnaeoijojxocvmoiojes" * 10000 text_df = pd.DataFrame({"voc_b_id": list(text), "count": [1] * len(text)}) tu.append(text_df.groupby("voc_b_id", as_index=False)["count"].count())if __name__ == '__main__': freeze_support() warnings.filterwarnings('ignore') manager = Manager() return_list = manager.list() pool=Pool(8) start=time.time() for i in range(200): pool.apply_async(get_pool,args=(return_list,)) pool.close() pool.join() print(time.time()-start) pd.concat(list(return_list)).groupby("voc_b_id", as_index=False)["count"].count()
立即登录