Getting Started
Fundamentals
Internals
Reference
K largest elements in collection
Optionally ordered by some key function
>>> import dask.bag as db >>> b = db.from_sequence([10, 3, 5, 7, 11, 4]) >>> list(b.topk(2)) [11, 10]
>>> list(b.topk(2, lambda x: -x)) [3, 4]
previous
dask.bag.Bag.take
next
dask.bag.Bag.var