解决" AttributeError:module' dask.bag'没有属性' from_filenames'"

时间:2018-03-19 15:18:15

标签: python dask

我正在按照一个简单的教程将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'

1 个答案:

答案 0 :(得分:1)

我怀疑您正在查看的资源过旧。我建议阅读fit_transform以获取最新信息。

我怀疑您正在寻找the Dask documentation

相关问题