【发布时间】:2016-09-15 15:37:28
【问题描述】:
我在 intel i3(四核)上使用 Pandas 0.18/Python 3.5 编写代码。
我读过这个: https://www.continuum.io/content/pandas-releasing-gil
我还有一些 IO 绑定的工作(将 CSV 文件解析为数据帧)。 我必须做很多计算,主要是乘以数据帧。
我的代码目前使用concurrent.futures ThreadPoolExecutor并行。
我的问题是:
- 一般来说,我应该使用线程并行运行 pandas 作业,还是 pandas 可以有效利用所有内核而无需我明确告诉它? (在这种情况下,我将按顺序执行我的作业)。
【问题讨论】:
标签: python multithreading pandas python-multithreading