brk-code

dask の API リファレンス

dask (dask/dask) の公開 API 255 件 —— クラス 75、関数 112、メソッド 68。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: dask/dask

種別件数
クラス75
関数112
メソッド68

API 一覧

funcdask._collections.new_collection(expr)
Create a new collection from an expr
classdask._expr.CompositeExpr
Private expression grouping many child expressions into one collection.
methoddask._expr.Expr.visualize(filename='dask-expr.svg', format=None, **kwargs)
Visualize the expression graph.
classdask._expr.LLGExpr
Low Level Graph Expression
funcdask._expr.optimize(expr:Expr, fuse:bool=True) -> Expr
High level query optimization This leverages three optimization passes: 1.
methoddask._task_spec.GraphNode.fuse(*key:KeyType | None=None, *tasks:GraphNode) -> GraphNode
Fuse a set of tasks into a single task.
methoddask._task_spec.GraphNode.substitute(subs:dict[KeyType, KeyType | GraphNode], key:KeyType | None=None) -> GraphNode
Substitute a dependency with a new value.
funcdask._task_spec.execute_graph(dsk:Iterable[GraphNode] | Mapping[KeyType, GraphNode], cache:MutableMapping[KeyType, object] | None=None, keys:Container[KeyType] | None=None) -> MutableMapping[KeyType, object]
Execute a given graph.
methoddask.array._array_expr._collection.Array.all(axis=None, keepdims=False, split_every=None, out=None)
Returns True if all elements evaluate to True.
methoddask.array._array_expr._collection.Array.conj()
Complex-conjugate all elements.
classdask.array._array_expr._gufunc.gufunc
Binds `pyfunc` into ``dask.array.apply_gufunc`` when called.
funcdask.array._array_expr._overlap.trim_overlap(x, depth, boundary=None)
Trim sides from each block.
funcdask.array._array_expr._slicing.normalize_index(idx, shape)
Normalize slicing indexes 1.
classdask.array._array_expr._ufunc.da_frompyfunc
A serializable `frompyfunc` object
classdask.array._array_expr.random.Generator
Container for the BitGenerators.
methoddask.array.core.Array.chunks()
Chunks property.
methoddask.array.core.Array.conj()
Complex-conjugate all elements.
methoddask.array.core.Array.copy()
Copy array.
methoddask.array.core.Array.dot(other)
Dot product of self and other.
methoddask.array.core.Array.itemsize() -> int
Length of one array element in bytes
methoddask.array.core.Array.nbytes() -> T_IntOrNaN
Number of bytes in array
methoddask.array.core.Array.partitions()
Slice an array by partitions.
methoddask.array.core.Array.ravel()
Return a flattened array.
methoddask.array.core.Array.repeat(repeats, axis=None)
Repeat elements of an array.
methoddask.array.core.Array.size() -> T_IntOrNaN
Number of elements in array
methoddask.array.core.Array.squeeze(axis=None)
Remove axes of length one from array.
methoddask.array.core.Array.topk(k, axis=-1, split_every=None)
The top k elements of an array.
methoddask.array.core.Array.transpose(*axes)
Reverse or permute the axes of an array.
methoddask.array.core.Array.vindex()
Vectorized indexing with broadcasting.
classdask.array.core.BlockView
An array-like interface to the blocks of an array.
methoddask.array.core.BlockView.shape() -> tuple[int, ...]
The number of blocks per axis.
methoddask.array.core.BlockView.size() -> int
The total number of blocks in the array.
classdask.array.core.PerformanceWarning
A warning given when bad chunking may cause poor performance
funcdask.array.core.broadcast_to(x, shape, chunks=None, meta=None)
Broadcast an array to a new shape.
funcdask.array.core.getter_nofancy(a, b, asarray=True, lock=None)
A simple wrapper around ``getter``.
funcdask.array.core.shapelist(a)
Get the shape of nested list
funcdask.array.creation.pad_edge(array, pad_width, mode, **kwargs)
Helper function for padding edges.
funcdask.array.gufunc.as_gufunc(signature=None, **kwargs)
Decorator for ``dask.array.gufunc``.
classdask.array.gufunc.gufunc
Binds `pyfunc` into ``dask.array.apply_gufunc`` when called.
funcdask.array.linalg.lu(a)
Compute the lu decomposition of a matrix.
funcdask.array.linalg.qr(a)
Compute the qr factorization of a matrix.
funcdask.array.optimization.optimize(dsk, keys, **kwargs)
Optimize dask for array computation 1.
funcdask.array.overlap.push(array, n, axis)
Dask-version of bottleneck.push ..
funcdask.array.overlap.trim_overlap(x, depth, boundary=None)
Trim sides from each block.
classdask.array.random.Generator
Container for the BitGenerators.
funcdask.array.rechunk.format_blocks(blocks)
Pretty-format *blocks*.
funcdask.array.reshape.reshape_blockwise(x:Array, shape:int | tuple[int, ...], chunks:tuple[tuple[int, ...], ...] | None=None) -> Array
Blockwise-reshape into a new shape.
funcdask.array.routines.aligned_coarsen_chunks(chunks:list[int], multiple:int) -> tuple[int, ...]
Returns a new chunking aligned with the coarsening multiple.
funcdask.array.routines.flip(m, axis=None)
Reverse element order along axis.
funcdask.array.routines.isnull(values)
pandas.isnull for dask arrays
funcdask.array.routines.notnull(values)
pandas.notnull for dask arrays
classdask.array.slicing.SlicingNoop
This indicates that a slicing operation is a no-op.
funcdask.array.slicing.issorted(seq)
Is sequence sorted?
funcdask.array.slicing.normalize_index(idx, shape)
Normalize slicing indexes 1.
funcdask.array.slicing.parse_assignment_indices(indices, shape)
Reformat the indices for assignment.
funcdask.array.slicing.replace_ellipsis(n, index)
Replace ...
funcdask.array.slicing.setitem(x, v, indices)
Chunk function of `setitem_array`.
funcdask.array.slicing.setitem_array(out_name, array, indices, value)
Master function for array assignment.
funcdask.array.stats.chisquare(f_obs, f_exp=None, ddof=0, axis=0)
Calculate a one-way chi-square test.
funcdask.array.svg.draw_sizes(shape, size=200)
Get size in pixels for all dimensions
classdask.array.ufunc.da_frompyfunc
A serializable `frompyfunc` object
funcdask.array.ufunc.wrap_elemwise(numpy_ufunc, source=np)
Wrap up numpy function into dask.array
funcdask.array.utils.validate_axis(axis, ndim)
Validate an input to axis= keywords
classdask.backends.CreationDispatch
Simple backend dispatch for collection-creation functions
methoddask.backends.CreationDispatch.backend() -> str
Return the desired collection backend
methoddask.backends.CreationDispatch.dispatch(backend:str)
Return the desired backend entrypoint
methoddask.backends.CreationDispatch.register_backend(name:str, backend:BackendEntrypointType) -> BackendEntrypointType
Register a target class for a specific array-backend label
methoddask.backends.CreationDispatch.register_inplace(backend:str, name:str | None=None) -> Callable[[Callable[BackendFuncParams, BackendFuncReturn]], Callable[BackendFuncParams, BackendFuncReturn]]
Register dispatchable function
funcdask.bag.avro.open_head(fs, path, compression)
Open a file just to read its head and size
funcdask.bag.avro.read_bytes(fo)
a long followed by that many bytes of data.
funcdask.bag.avro.read_chunk(fobj, off, l, head)
Get rows from raw bytes block
funcdask.bag.avro.read_file(fo)
Get rows from file-like
funcdask.bag.avro.read_long(fo)
variable-length, zig-zag encoding.
methoddask.bag.core.Bag.all(split_every=None)
Are all elements truthy?
methoddask.bag.core.Bag.any(split_every=None)
Are any of the elements truthy?
methoddask.bag.core.Bag.count(split_every=None)
Count the number of elements.
methoddask.bag.core.Bag.flatten()
Concatenate nested lists into one long list.
methoddask.bag.core.Bag.join(other, on_self, on_other=None)
Joins collection with another collection.
methoddask.bag.core.Bag.max(split_every=None)
Maximum element
methoddask.bag.core.Bag.mean()
Arithmetic mean
methoddask.bag.core.Bag.min(split_every=None)
Minimum element
methoddask.bag.core.Bag.product(other)
Cartesian product between two bags.
methoddask.bag.core.Bag.reduction(perpartition, aggregate, split_every=None, out_type=Item, name=None)
Reduce collection with reduction operators.
methoddask.bag.core.Bag.std(ddof=0)
Standard deviation
methoddask.bag.core.Bag.sum(split_every=None)
Sum all elements
methoddask.bag.core.Bag.take(k, npartitions=1, compute=True, warn=True)
Take the first k elements.
methoddask.bag.core.Bag.var(ddof=0)
Variance
methoddask.bag.core.Item.from_delayed(value)
Create bag item from a dask.delayed value.
methoddask.bag.core.Item.to_delayed(optimize_graph=True)
Convert into a ``dask.delayed`` object.
funcdask.bag.core.from_delayed(values)
Create bag from many dask Delayed objects.
funcdask.bag.core.from_url(urls)
Create a dask Bag from a url.
funcdask.bag.core.lazify(dsk)
Remove unnecessary calls to ``list`` in tasks.
funcdask.bag.core.optimize(dsk, keys, fuse_keys=None, **kwargs)
Optimize a dask from a dask Bag.
funcdask.bag.core.split(seq, n)
Split apart a sequence into n equal pieces.
funcdask.bag.core.unpack_scalar_dask_kwargs(kwargs)
Extracts dask values from kwargs.
classdask.base.DaskMethodsMixin
A mixin adding standard dask collection methods
funcdask.base.annotate(**annotations:Any) -> Iterator[None]
Context Manager for setting HighLevelGraph Layer annotations.
funcdask.base.collections_to_expr(collections:Iterable, optimize_graph:bool=True) -> Expr
Convert many collections into a single dask expression.
funcdask.base.get_annotations() -> dict[str, Any]
Get current annotations.
funcdask.base.get_name_from_key(key:Key) -> str
Given a dask collection's key, extract the collection name.
funcdask.base.is_dask_collection(x) -> bool
Returns ``True`` if ``x`` is a dask collection.
classdask.callbacks.add_callbacks
Context manager for callbacks.
funcdask.callbacks.normalize_callback(cb)
Normalizes a callback to a tuple
funcdask.cli.cli()
Dask command line interface.
funcdask.cli.config()
Dask config settings
funcdask.cli.config_get(key=None)
Print config key, or the whole config.
funcdask.cli.config_list()
Print the whole config.
funcdask.cli.config_set(key, value, file)
Set a Dask config key to a new value
funcdask.cli.info()
Information about your dask installation.
funcdask.cli.run_cli()
Run the dask command line interface.
funcdask.cli.versions()
Print versions of Dask related projects.
funcdask.config.canonical_name(k:str, config:dict) -> str
Return the canonical name for a key.
funcdask.config.deserialize(data:str) -> Any
De-serialize config data into the original object.
funcdask.config.paths_containing_key(key:str, paths:Sequence[str]=paths) -> Iterator[pathlib.Path]
Generator yielding paths which contain the given key.
funcdask.config.serialize(data:Any) -> str
Serialize config data into a string.
funcdask.core.ishashable(x)
Is x hashable?
funcdask.core.iskey(key:object) -> bool
Return True if the given object is a potential dask key; False otherwise.
funcdask.core.istask(x)
Is x a runnable task?
classdask.core.literal
A small serializable object to wrap literal values without copying
funcdask.core.preorder_traversal(task)
A generator to preorder-traverse a task.
funcdask.core.validate_key(key:object) -> None
Validate the format of a dask key.
funcdask.dataframe._pyarrow.is_object_string_dtype(dtype) -> bool
Determine if input is a non-pyarrow string dtype
funcdask.dataframe._pyarrow.is_pyarrow_string_dtype(dtype) -> bool
Is the input dtype a pyarrow string?
funcdask.dataframe.core.meta_warning(df:Any, method:str) -> str
Provide an informative message when the user is asked to provide metadata
funcdask.dataframe.core.split_evenly(df, k)
Split dataframe into k roughly equal parts
classdask.dataframe.dask_expr._accessor.Accessor
Base class for pandas Accessor objects cat, dt, and str.
classdask.dataframe.dask_expr._collection.DataFrame
DataFrame-like Expr Collection.
methoddask.dataframe.dask_expr._collection.DataFrame.ndim()
Return dimensionality
classdask.dataframe.dask_expr._collection.FrameBase
Base class for Expr-backed Collections
methoddask.dataframe.dask_expr._collection.FrameBase.analyze(filename:str | None=None, format:str | None=None) -> None
Outputs statistics about every node in the expression.
methoddask.dataframe.dask_expr._collection.FrameBase.clear_divisions()
Forget division information.
methoddask.dataframe.dask_expr._collection.FrameBase.diff(periods=1, axis=0)
..
methoddask.dataframe.dask_expr._collection.FrameBase.dtypes()
Return data types
methoddask.dataframe.dask_expr._collection.FrameBase.index()
Return dask Index instance
methoddask.dataframe.dask_expr._collection.FrameBase.known_divisions()
Whether the divisions are known.
methoddask.dataframe.dask_expr._collection.FrameBase.kurtosis(axis=0, fisher=True, bias=True, nan_policy='propagate', numeric_only=False)
..
methoddask.dataframe.dask_expr._collection.FrameBase.npartitions()
Return number of partitions
methoddask.dataframe.dask_expr._collection.FrameBase.optimize(fuse:bool=True)
Optimizes the DataFrame.
methoddask.dataframe.dask_expr._collection.FrameBase.reset_index(drop:bool=False)
Reset the index to the default index.
methoddask.dataframe.dask_expr._collection.FrameBase.skew(axis=0, bias=True, nan_policy='propagate', numeric_only=False)
..
methoddask.dataframe.dask_expr._collection.FrameBase.to_dask_array(lengths=None, meta=None, optimize:bool=True, **optimize_kwargs) -> Array
Convert a dask DataFrame to a dask array.
classdask.dataframe.dask_expr._collection.Index
Index-like Expr Collection.
classdask.dataframe.dask_expr._collection.Scalar
Scalar Expr Collection
classdask.dataframe.dask_expr._collection.Series
Series-like Expr Collection.
methoddask.dataframe.dask_expr._collection.Series.nbytes()
Number of bytes
methoddask.dataframe.dask_expr._collection.Series.ndim()
Return dimensionality
funcdask.dataframe.dask_expr._collection.from_dask_array(x, columns=None, index=None, meta=None) -> DataFrame
Create a Dask DataFrame from a Dask Array.
classdask.dataframe.dask_expr._expr.Apply
A good example of writing a less-trivial blockwise operation
classdask.dataframe.dask_expr._expr.AsType
A good example of writing a trivial blockwise operation
classdask.dataframe.dask_expr._expr.Assign
Column Assignment
methoddask.dataframe.dask_expr._expr.Expr.known_divisions()
Whether divisions are already known
classdask.dataframe.dask_expr._expr.Head
Take the first `n` rows of the first partition
classdask.dataframe.dask_expr._expr.Index
Column Selection
classdask.dataframe.dask_expr._expr.Lengths
Returns a tuple of partition lengths
classdask.dataframe.dask_expr._expr.Literal
Represent a literal (known) value as an `Expr`
classdask.dataframe.dask_expr._expr.Partitions
Select one or more partitions
classdask.dataframe.dask_expr._expr.Projection
Column Selection
classdask.dataframe.dask_expr._expr.ResetIndex
Reset the index of a Series or DataFrame
classdask.dataframe.dask_expr._expr.Tail
Take the last `n` rows of the last partition
funcdask.dataframe.dask_expr._expr.emulate(func, *udf=False, *args, **kwargs)
Apply a function using args / kwargs.
classdask.dataframe.dask_expr._groupby.Aggregation
User defined groupby-aggregation.
classdask.dataframe.dask_expr._groupby.SingleAggregation
Single groupby aggregation This is an abstract class.
classdask.dataframe.dask_expr._merge.Merge
Merge / join two dataframes This is an abstract class.
classdask.dataframe.dask_expr._repartition.Repartition
Abstract repartitioning expression
classdask.dataframe.dask_expr._repartition.RepartitionDivisions
Repartition to specific divisions
classdask.dataframe.dask_expr._repartition.RepartitionToFewer
Reduce the partition count
classdask.dataframe.dask_expr._repartition.RepartitionToMore
Increase the partition count
classdask.dataframe.dask_expr._shuffle.DiskShuffle
Disk-based shuffle implementation
classdask.dataframe.dask_expr._shuffle.P2PShuffle
P2P worker-based shuffle implementation
classdask.dataframe.dask_expr._shuffle.SetIndex
Abstract ``set_index`` class.
classdask.dataframe.dask_expr._shuffle.SetPartition
Shuffles the DataFrame according to its new divisions.
classdask.dataframe.dask_expr._shuffle.TaskShuffle
Staged task-based shuffle implementation
classdask.dataframe.dask_expr.io.io.FromPandas
The only way today to get a real dataframe
classdask.dataframe.dask_expr.io.parquet.ReadParquetFSSpec
Read a parquet dataset
classdask.dataframe.groupby.Aggregation
User defined groupby-aggregation.
classdask.dataframe.io.orc.utils.ORCEngine
The API necessary to provide a new ORC reader/writer
funcdask.dataframe.io.parquet.core.get_engine(engine:Literal['auto', 'pyarrow'] | type[Engine]) -> type[Engine]
Get the parquet engine backend implementation.
classdask.dataframe.io.parquet.utils.Engine
The API necessary to provide a new Parquet reader/writer
funcdask.dataframe.methods.boundary_slice(df, start, stop, right_boundary=True, left_boundary=True)
Index slice start/stop.
funcdask.dataframe.methods.loc(df, iindexer, cindexer=None)
.loc for known divisions
funcdask.dataframe.methods.try_loc(df, iindexer, cindexer=None)
.loc for unknown divisions
funcdask.dataframe.shuffle.ensure_cleanup_on_exception(p)
Ensure a partd.File is cleaned up.
classdask.dataframe.shuffle.maybe_buffered_partd
If serialized, will return non-buffered partd.
classdask.dataframe.utils.AttributeNotImplementedError
NotImplementedError and AttributeError
funcdask.dataframe.utils.clear_known_categories(x, cols=None, index=True, dtype_backend=None)
Set categories to be unknown.
funcdask.dataframe.utils.index_summary(idx, name=None)
Summarized representation of an Index.
funcdask.dataframe.utils.pyarrow_strings_enabled() -> bool
Config setting to convert objects to pyarrow strings
funcdask.dataframe.utils.valid_divisions(divisions)
Are the provided divisions valid?
classdask.delayed.Delayed
Represents a value to be computed by dask.
funcdask.delayed.tokenize(*pure=None, *args, **kwargs)
Mapping function from task -> consistent name.
classdask.diagnostics.profile.CacheProfiler
A profiler for dask execution at the scheduler cache level.
methoddask.diagnostics.profile.CacheProfiler.clear()
Clear out old results from profiler
classdask.diagnostics.profile.Profiler
A profiler for dask execution at the task level.
methoddask.diagnostics.profile.Profiler.clear()
Clear out old results from profiler
classdask.diagnostics.profile.ResourceProfiler
A profiler for resource use.
methoddask.diagnostics.profile.ResourceProfiler.close()
Shutdown the resource tracker process
classdask.diagnostics.progress.ProgressBar
A progress bar for dask.
funcdask.diagnostics.progress.format_time(t)
Format seconds into a human readable form.
funcdask.dot.dot_graph(dsk, filename='mydask', format=None, **kwargs)
Render a task graph using dot.
funcdask.dot.has_sub_tasks(task)
Returns True if the task has sub tasks
funcdask.dot.task_label(task)
Label for a task on a dot graph.
classdask.graph_manipulation.chunks
Callables to be inserted in the Dask graph
methoddask.graph_manipulation.chunks.bind(node:T, *args, **kwargs) -> T
Dummy graph node of :func:`bind` and :func:`wait_on`.
methoddask.graph_manipulation.chunks.checkpoint(*args, **kwargs) -> None
Dummy graph node of :func:`checkpoint`.
methoddask.highlevelgraph.Layer.is_materialized() -> bool
Return whether the layer is materialized or not
classdask.layers.ArrayChunkShapeDep
Produce chunk shapes given a chunk index
classdask.layers.ArrayOverlapLayer
Simple HighLevelGraph array overlap layer.
classdask.layers.ArraySliceDep
Produce slice(s) into the full-sized array given a chunk index
classdask.layers.CallableLazyImport
Function Wrapper for Lazy Importing.
funcdask.local.default_get_id()
Default get_id
funcdask.local.fire_tasks(chunksize)
Fire off a task to the thread pool
funcdask.local.identity(x)
Identity function.
funcdask.multiprocessing.get_context()
Return the current multiprocessing context.
funcdask.multiprocessing.remote_exception(exc:Exception, tb) -> Exception
Metaclass that wraps exception type in RemoteException
funcdask.optimization.default_fused_linear_keys_renamer(keys)
Create new keys for fused tasks
classdask.rewrite.Node
A Discrimination Net node.
classdask.rewrite.RewriteRule
A rewrite rule.
classdask.rewrite.RuleSet
A set of rewrite rules.
methoddask.rewrite.RuleSet.add(rule)
Add a rule to the RuleSet.
methoddask.rewrite.RuleSet.rewrite(task, strategy='bottom_up')
Apply the `RuleSet` to `task`.
classdask.rewrite.Token
A token object.
classdask.rewrite.Traverser
Traverser interface for tasks.
methoddask.rewrite.Traverser.copy()
Copy the traverser in its current state.
methoddask.rewrite.Traverser.next()
Proceed to the next term in the preorder traversal.
funcdask.rewrite.args(task)
Get the arguments for the current task
funcdask.rewrite.head(task)
Return the top level node of a task
classdask.sizeof.SimpleSizeof
Sentinel class to mark a class to be skipped by the dispatcher.
funcdask.system.cpu_count() -> int
Get the available CPU count for this system.
classdask.typing.DaskCollection
Protocol defining the interface of a Dask collection.
methoddask.typing.DaskCollection.compute(**kwargs:Any) -> Any
Compute this dask collection.
classdask.typing.HLGDaskCollection
Protocol defining a Dask collection that uses HighLevelGraphs.
classdask.utils.Dispatch
Simple single dispatch.
classdask.utils.IndexCallable
Provide getitem syntax for functions >>> def inc(x): ...
classdask.utils.OperatorMethodMixin
A mixin for dynamically implementing operators
funcdask.utils.cached_max(seq)
Compute max with caching.
classdask.utils.cached_property
Read only version of functools.cached_property.
classdask.utils.disable_gc
Context manager to disable garbage collection.
funcdask.utils.ensure_bytes(s) -> bytes
Attempt to turn `s` into bytes.
funcdask.utils.ensure_dict(d:Mapping[K, V], *copy:bool=False) -> dict[K, V]
Convert a generic Mapping into a dict.
funcdask.utils.ensure_not_exists(filename) -> None
Ensure that a file does not exist.
funcdask.utils.ensure_set(s:Set[T], *copy:bool=False) -> set[T]
Convert a generic Set into a set.
funcdask.utils.format_time_ago(n:datetime) -> str
Calculate a '3 hours ago' type string from a Python datetime.
funcdask.utils.funcname(func) -> str
Get the name of a function.
funcdask.utils.get_named_args(func) -> list[str]
Get all non ``*args/**kwargs`` arguments for a function
funcdask.utils.import_required(mod_name, error_msg)
Attempt to import a required dependency.
funcdask.utils.is_arraylike(x) -> bool
Is this object a numpy array or something similar?
funcdask.utils.is_dataframe_like(df) -> bool
Looks like a Pandas DataFrame
funcdask.utils.is_empty(obj)
Duck-typed check for “emptiness” of an object.
funcdask.utils.is_index_like(s) -> bool
Looks like a Pandas Index
funcdask.utils.is_namedtuple_instance(obj:Any) -> bool
Returns True if obj is an instance of a namedtuple.
funcdask.utils.is_series_like(s) -> bool
Looks like a Pandas Series
classdask.utils.itemgetter
Variant of operator.itemgetter that supports equality tests
funcdask.utils.random_state_data(n:int, random_state=None) -> list
Return a list of arrays that can initialize ``np.random.RandomState``.
funcdask.utils.show_versions() -> None
Provide version information for bug reports.
funcdask.utils.unzip(ls, nout)
Unzip a list of lists into ``nout`` outputs.

この情報について

掲載しているシグネチャは dask/dask の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る