我正在按照一个简单的教程将pushdift.io中的Reddit注释数据加载到一个dask包中。我得到了一个奇怪的错误:"解决" AttributeError:module' dask.bag'没有属性' from_filenames'",尽管这是此处所述的标准程序:http://dask.pydata.org/en/doc-test-build/bag.html
import dask
import dask.bag as db
data = db.from_filenames("reddit_1_28_2018.txt", chunkbytes=100000).map(json.loads)
AttributeError Traceback (most recent call last)
<ipython-input-17-bcbd31affbfb> in <module>()
2 import dask.bag as db
3
----> 4 data = db.from_filenames("reddit_1_28_2018.txt", chunkbytes=100000).map(json.loads)
AttributeError: module 'dask.bag' has no attribute 'from_filenames'