File: bag-api.rst

package info (click to toggle)
dask 2024.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,024 kB
  • sloc: python: 105,182; javascript: 1,917; makefile: 159; sh: 88
file content (123 lines) | stat: -rw-r--r-- 1,574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
API
===

.. currentmodule:: dask.bag

Create Bags
-----------

.. autosummary::
   :toctree: generated/

   from_sequence
   from_delayed
   from_url
   range
   read_text
   read_avro

From dataframe
~~~~~~~~~~~~~~

.. currentmodule:: dask.dataframe

.. autosummary::
   :toctree: generated/

   DataFrame.to_bag
   Series.to_bag

Top-level functions
-------------------

.. currentmodule:: dask.bag

.. autosummary::
   :toctree: generated/

   concat
   map
   map_partitions
   to_textfiles
   zip

Random Sampling
---------------

.. autosummary::
   :toctree: generated/

   random.choices
   random.sample


Turn Bags into other things
---------------------------

.. autosummary::
   :toctree: generated/

   Bag.to_textfiles
   Bag.to_dataframe
   Bag.to_delayed
   Bag.to_avro


Bag Methods
-----------

.. autosummary::
   :toctree: generated/

   Bag
   Bag.accumulate
   Bag.all
   Bag.any
   Bag.compute
   Bag.count
   Bag.distinct
   Bag.filter
   Bag.flatten
   Bag.fold
   Bag.foldby
   Bag.frequencies
   Bag.groupby
   Bag.join
   Bag.map
   Bag.map_partitions
   Bag.max
   Bag.mean
   Bag.min
   Bag.persist
   Bag.pluck
   Bag.product
   Bag.reduction
   Bag.random_sample
   Bag.remove
   Bag.repartition
   Bag.starmap
   Bag.std
   Bag.sum
   Bag.take
   Bag.to_avro
   Bag.to_dataframe
   Bag.to_delayed
   Bag.to_textfiles
   Bag.topk
   Bag.var
   Bag.visualize


Item Methods
------------

.. autosummary::
   :toctree: generated/

   Item
   Item.apply
   Item.compute
   Item.from_delayed
   Item.persist
   Item.to_delayed
   Item.visualize