タイトルはそのほとんどを述べていますが、問題のオブジェクトは次のとおりです。
>>> import dask.bag as db
>>> b = db.from_sequence([{'name': 'Alice', 'balance': 100},
... {'name': 'Bob', 'balance': 200},
... {'name': 'Charlie', 'balance': 300}],
... npartitions=2)
しかし、私がしようとすると
>>> b.to_textfiles('*.json')
私は得る
AttributeError: 'dict' object has no attribute 'endswith'
Traceback
---------
File "/Users/jlatmann/anaconda/envs/python3/lib/python3.5/site-packages/dask/async.py", line 267, in execute_task
result = _execute_task(task, data)
File "/Users/jlatmann/anaconda/envs/python3/lib/python3.5/site-packages/dask/async.py", line 249, in _execute_task
return func(*args2)
File "/Users/jlatmann/anaconda/envs/python3/lib/python3.5/site-packages/dask/bag/core.py", line 1025, in write
if not (firstline.endswith(os.linesep) or firstline.endswith('\n')):
ダスクのバージョン: 0.9.0
sys.バージョン
3.5.1 |アナコンダ 4.0.0 (x86_64)| (デフォルト、2015 年 12 月 7 日 11:24:55) [GCC 4.2.1 (Apple Inc. ビルド 5577)]
見てくれてありがとう!