dask の API リファレンス
dask (dask/dask) の公開 API 255 件 —— クラス 75、関数 112、メソッド 68。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: dask/dask
| 種別 | 件数 |
|---|---|
| クラス | 75 |
| 関数 | 112 |
| メソッド | 68 |
API 一覧
func
dask._collections.new_collection(expr)Create a new collection from an expr
class
dask._expr.CompositeExprPrivate expression grouping many child expressions into one collection.
method
dask._expr.Expr.visualize(filename='dask-expr.svg', format=None, **kwargs)Visualize the expression graph.
class
dask._expr.LLGExprLow Level Graph Expression
func
dask._expr.optimize(expr:Expr, fuse:bool=True) -> ExprHigh level query optimization This leverages three optimization passes: 1.
method
dask._task_spec.GraphNode.fuse(*key:KeyType | None=None, *tasks:GraphNode) -> GraphNodeFuse a set of tasks into a single task.
method
dask._task_spec.GraphNode.substitute(subs:dict[KeyType, KeyType | GraphNode], key:KeyType | None=None) -> GraphNodeSubstitute a dependency with a new value.
func
dask._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.
method
dask.array._array_expr._collection.Array.all(axis=None, keepdims=False, split_every=None, out=None)Returns True if all elements evaluate to True.
method
dask.array._array_expr._collection.Array.conj()Complex-conjugate all elements.
class
dask.array._array_expr._gufunc.gufuncBinds `pyfunc` into ``dask.array.apply_gufunc`` when called.
func
dask.array._array_expr._overlap.trim_overlap(x, depth, boundary=None)Trim sides from each block.
func
dask.array._array_expr._slicing.normalize_index(idx, shape)Normalize slicing indexes 1.
class
dask.array._array_expr._ufunc.da_frompyfuncA serializable `frompyfunc` object
class
dask.array._array_expr.random.GeneratorContainer for the BitGenerators.
method
dask.array.core.Array.chunks()Chunks property.
method
dask.array.core.Array.conj()Complex-conjugate all elements.
method
dask.array.core.Array.copy()Copy array.
method
dask.array.core.Array.dot(other)Dot product of self and other.
method
dask.array.core.Array.itemsize() -> intLength of one array element in bytes
method
dask.array.core.Array.nbytes() -> T_IntOrNaNNumber of bytes in array
method
dask.array.core.Array.partitions()Slice an array by partitions.
method
dask.array.core.Array.ravel()Return a flattened array.
method
dask.array.core.Array.repeat(repeats, axis=None)Repeat elements of an array.
method
dask.array.core.Array.size() -> T_IntOrNaNNumber of elements in array
method
dask.array.core.Array.squeeze(axis=None)Remove axes of length one from array.
method
dask.array.core.Array.topk(k, axis=-1, split_every=None)The top k elements of an array.
method
dask.array.core.Array.transpose(*axes)Reverse or permute the axes of an array.
method
dask.array.core.Array.vindex()Vectorized indexing with broadcasting.
class
dask.array.core.BlockViewAn array-like interface to the blocks of an array.
method
dask.array.core.BlockView.shape() -> tuple[int, ...]The number of blocks per axis.
method
dask.array.core.BlockView.size() -> intThe total number of blocks in the array.
class
dask.array.core.PerformanceWarningA warning given when bad chunking may cause poor performance
func
dask.array.core.broadcast_to(x, shape, chunks=None, meta=None)Broadcast an array to a new shape.
func
dask.array.core.getter_nofancy(a, b, asarray=True, lock=None)A simple wrapper around ``getter``.
func
dask.array.core.shapelist(a)Get the shape of nested list
func
dask.array.creation.pad_edge(array, pad_width, mode, **kwargs)Helper function for padding edges.
func
dask.array.gufunc.as_gufunc(signature=None, **kwargs)Decorator for ``dask.array.gufunc``.
class
dask.array.gufunc.gufuncBinds `pyfunc` into ``dask.array.apply_gufunc`` when called.
func
dask.array.linalg.lu(a)Compute the lu decomposition of a matrix.
func
dask.array.linalg.qr(a)Compute the qr factorization of a matrix.
func
dask.array.optimization.optimize(dsk, keys, **kwargs)Optimize dask for array computation 1.
func
dask.array.overlap.push(array, n, axis)Dask-version of bottleneck.push ..
func
dask.array.overlap.trim_overlap(x, depth, boundary=None)Trim sides from each block.
class
dask.array.random.GeneratorContainer for the BitGenerators.
func
dask.array.rechunk.format_blocks(blocks)Pretty-format *blocks*.
func
dask.array.reshape.reshape_blockwise(x:Array, shape:int | tuple[int, ...], chunks:tuple[tuple[int, ...], ...] | None=None) -> ArrayBlockwise-reshape into a new shape.
func
dask.array.routines.aligned_coarsen_chunks(chunks:list[int], multiple:int) -> tuple[int, ...]Returns a new chunking aligned with the coarsening multiple.
func
dask.array.routines.flip(m, axis=None)Reverse element order along axis.
func
dask.array.routines.isnull(values)pandas.isnull for dask arrays
func
dask.array.routines.notnull(values)pandas.notnull for dask arrays
class
dask.array.slicing.SlicingNoopThis indicates that a slicing operation is a no-op.
func
dask.array.slicing.issorted(seq)Is sequence sorted?
func
dask.array.slicing.normalize_index(idx, shape)Normalize slicing indexes 1.
func
dask.array.slicing.parse_assignment_indices(indices, shape)Reformat the indices for assignment.
func
dask.array.slicing.replace_ellipsis(n, index)Replace ...
func
dask.array.slicing.setitem(x, v, indices)Chunk function of `setitem_array`.
func
dask.array.slicing.setitem_array(out_name, array, indices, value)Master function for array assignment.
func
dask.array.stats.chisquare(f_obs, f_exp=None, ddof=0, axis=0)Calculate a one-way chi-square test.
func
dask.array.svg.draw_sizes(shape, size=200)Get size in pixels for all dimensions
class
dask.array.ufunc.da_frompyfuncA serializable `frompyfunc` object
func
dask.array.ufunc.wrap_elemwise(numpy_ufunc, source=np)Wrap up numpy function into dask.array
func
dask.array.utils.validate_axis(axis, ndim)Validate an input to axis= keywords
class
dask.backends.CreationDispatchSimple backend dispatch for collection-creation functions
method
dask.backends.CreationDispatch.backend() -> strReturn the desired collection backend
method
dask.backends.CreationDispatch.dispatch(backend:str)Return the desired backend entrypoint
method
dask.backends.CreationDispatch.register_backend(name:str, backend:BackendEntrypointType) -> BackendEntrypointTypeRegister a target class for a specific array-backend label
method
dask.backends.CreationDispatch.register_inplace(backend:str, name:str | None=None) -> Callable[[Callable[BackendFuncParams, BackendFuncReturn]], Callable[BackendFuncParams, BackendFuncReturn]]Register dispatchable function
func
dask.bag.avro.open_head(fs, path, compression)Open a file just to read its head and size
func
dask.bag.avro.read_bytes(fo)a long followed by that many bytes of data.
func
dask.bag.avro.read_chunk(fobj, off, l, head)Get rows from raw bytes block
func
dask.bag.avro.read_file(fo)Get rows from file-like
func
dask.bag.avro.read_long(fo)variable-length, zig-zag encoding.
method
dask.bag.core.Bag.all(split_every=None)Are all elements truthy?
method
dask.bag.core.Bag.any(split_every=None)Are any of the elements truthy?
method
dask.bag.core.Bag.count(split_every=None)Count the number of elements.
method
dask.bag.core.Bag.flatten()Concatenate nested lists into one long list.
method
dask.bag.core.Bag.join(other, on_self, on_other=None)Joins collection with another collection.
method
dask.bag.core.Bag.max(split_every=None)Maximum element
method
dask.bag.core.Bag.mean()Arithmetic mean
method
dask.bag.core.Bag.min(split_every=None)Minimum element
method
dask.bag.core.Bag.product(other)Cartesian product between two bags.
method
dask.bag.core.Bag.reduction(perpartition, aggregate, split_every=None, out_type=Item, name=None)Reduce collection with reduction operators.
method
dask.bag.core.Bag.std(ddof=0)Standard deviation
method
dask.bag.core.Bag.sum(split_every=None)Sum all elements
method
dask.bag.core.Bag.take(k, npartitions=1, compute=True, warn=True)Take the first k elements.
method
dask.bag.core.Bag.var(ddof=0)Variance
method
dask.bag.core.Item.from_delayed(value)Create bag item from a dask.delayed value.
method
dask.bag.core.Item.to_delayed(optimize_graph=True)Convert into a ``dask.delayed`` object.
func
dask.bag.core.from_delayed(values)Create bag from many dask Delayed objects.
func
dask.bag.core.from_url(urls)Create a dask Bag from a url.
func
dask.bag.core.lazify(dsk)Remove unnecessary calls to ``list`` in tasks.
func
dask.bag.core.optimize(dsk, keys, fuse_keys=None, **kwargs)Optimize a dask from a dask Bag.
func
dask.bag.core.split(seq, n)Split apart a sequence into n equal pieces.
func
dask.bag.core.unpack_scalar_dask_kwargs(kwargs)Extracts dask values from kwargs.
class
dask.base.DaskMethodsMixinA mixin adding standard dask collection methods
func
dask.base.annotate(**annotations:Any) -> Iterator[None]Context Manager for setting HighLevelGraph Layer annotations.
func
dask.base.collections_to_expr(collections:Iterable, optimize_graph:bool=True) -> ExprConvert many collections into a single dask expression.
func
dask.base.get_annotations() -> dict[str, Any]Get current annotations.
func
dask.base.get_name_from_key(key:Key) -> strGiven a dask collection's key, extract the collection name.
func
dask.base.is_dask_collection(x) -> boolReturns ``True`` if ``x`` is a dask collection.
class
dask.callbacks.add_callbacksContext manager for callbacks.
func
dask.callbacks.normalize_callback(cb)Normalizes a callback to a tuple
func
dask.cli.cli()Dask command line interface.
func
dask.cli.config()Dask config settings
func
dask.cli.config_get(key=None)Print config key, or the whole config.
func
dask.cli.config_list()Print the whole config.
func
dask.cli.config_set(key, value, file)Set a Dask config key to a new value
func
dask.cli.info()Information about your dask installation.
func
dask.cli.run_cli()Run the dask command line interface.
func
dask.cli.versions()Print versions of Dask related projects.
func
dask.config.canonical_name(k:str, config:dict) -> strReturn the canonical name for a key.
func
dask.config.deserialize(data:str) -> AnyDe-serialize config data into the original object.
func
dask.config.paths_containing_key(key:str, paths:Sequence[str]=paths) -> Iterator[pathlib.Path]Generator yielding paths which contain the given key.
func
dask.config.serialize(data:Any) -> strSerialize config data into a string.
func
dask.core.ishashable(x)Is x hashable?
func
dask.core.iskey(key:object) -> boolReturn True if the given object is a potential dask key; False otherwise.
func
dask.core.istask(x)Is x a runnable task?
class
dask.core.literalA small serializable object to wrap literal values without copying
func
dask.core.preorder_traversal(task)A generator to preorder-traverse a task.
func
dask.core.validate_key(key:object) -> NoneValidate the format of a dask key.
func
dask.dataframe._pyarrow.is_object_string_dtype(dtype) -> boolDetermine if input is a non-pyarrow string dtype
func
dask.dataframe._pyarrow.is_pyarrow_string_dtype(dtype) -> boolIs the input dtype a pyarrow string?
func
dask.dataframe.core.meta_warning(df:Any, method:str) -> strProvide an informative message when the user is asked to provide metadata
func
dask.dataframe.core.split_evenly(df, k)Split dataframe into k roughly equal parts
class
dask.dataframe.dask_expr._accessor.AccessorBase class for pandas Accessor objects cat, dt, and str.
class
dask.dataframe.dask_expr._collection.DataFrameDataFrame-like Expr Collection.
method
dask.dataframe.dask_expr._collection.DataFrame.ndim()Return dimensionality
class
dask.dataframe.dask_expr._collection.FrameBaseBase class for Expr-backed Collections
method
dask.dataframe.dask_expr._collection.FrameBase.analyze(filename:str | None=None, format:str | None=None) -> NoneOutputs statistics about every node in the expression.
method
dask.dataframe.dask_expr._collection.FrameBase.clear_divisions()Forget division information.
method
dask.dataframe.dask_expr._collection.FrameBase.diff(periods=1, axis=0)..
method
dask.dataframe.dask_expr._collection.FrameBase.dtypes()Return data types
method
dask.dataframe.dask_expr._collection.FrameBase.index()Return dask Index instance
method
dask.dataframe.dask_expr._collection.FrameBase.known_divisions()Whether the divisions are known.
method
dask.dataframe.dask_expr._collection.FrameBase.kurtosis(axis=0, fisher=True, bias=True, nan_policy='propagate', numeric_only=False)..
method
dask.dataframe.dask_expr._collection.FrameBase.npartitions()Return number of partitions
method
dask.dataframe.dask_expr._collection.FrameBase.optimize(fuse:bool=True)Optimizes the DataFrame.
method
dask.dataframe.dask_expr._collection.FrameBase.reset_index(drop:bool=False)Reset the index to the default index.
method
dask.dataframe.dask_expr._collection.FrameBase.skew(axis=0, bias=True, nan_policy='propagate', numeric_only=False)..
method
dask.dataframe.dask_expr._collection.FrameBase.to_dask_array(lengths=None, meta=None, optimize:bool=True, **optimize_kwargs) -> ArrayConvert a dask DataFrame to a dask array.
class
dask.dataframe.dask_expr._collection.IndexIndex-like Expr Collection.
class
dask.dataframe.dask_expr._collection.ScalarScalar Expr Collection
class
dask.dataframe.dask_expr._collection.SeriesSeries-like Expr Collection.
method
dask.dataframe.dask_expr._collection.Series.nbytes()Number of bytes
method
dask.dataframe.dask_expr._collection.Series.ndim()Return dimensionality
func
dask.dataframe.dask_expr._collection.from_dask_array(x, columns=None, index=None, meta=None) -> DataFrameCreate a Dask DataFrame from a Dask Array.
class
dask.dataframe.dask_expr._expr.ApplyA good example of writing a less-trivial blockwise operation
class
dask.dataframe.dask_expr._expr.AsTypeA good example of writing a trivial blockwise operation
class
dask.dataframe.dask_expr._expr.AssignColumn Assignment
method
dask.dataframe.dask_expr._expr.Expr.known_divisions()Whether divisions are already known
class
dask.dataframe.dask_expr._expr.HeadTake the first `n` rows of the first partition
class
dask.dataframe.dask_expr._expr.IndexColumn Selection
class
dask.dataframe.dask_expr._expr.LengthsReturns a tuple of partition lengths
class
dask.dataframe.dask_expr._expr.LiteralRepresent a literal (known) value as an `Expr`
class
dask.dataframe.dask_expr._expr.PartitionsSelect one or more partitions
class
dask.dataframe.dask_expr._expr.ProjectionColumn Selection
class
dask.dataframe.dask_expr._expr.ResetIndexReset the index of a Series or DataFrame
class
dask.dataframe.dask_expr._expr.TailTake the last `n` rows of the last partition
func
dask.dataframe.dask_expr._expr.emulate(func, *udf=False, *args, **kwargs)Apply a function using args / kwargs.
class
dask.dataframe.dask_expr._groupby.AggregationUser defined groupby-aggregation.
class
dask.dataframe.dask_expr._groupby.SingleAggregationSingle groupby aggregation This is an abstract class.
class
dask.dataframe.dask_expr._merge.MergeMerge / join two dataframes This is an abstract class.
class
dask.dataframe.dask_expr._repartition.RepartitionAbstract repartitioning expression
class
dask.dataframe.dask_expr._repartition.RepartitionDivisionsRepartition to specific divisions
class
dask.dataframe.dask_expr._repartition.RepartitionToFewerReduce the partition count
class
dask.dataframe.dask_expr._repartition.RepartitionToMoreIncrease the partition count
class
dask.dataframe.dask_expr._shuffle.DiskShuffleDisk-based shuffle implementation
class
dask.dataframe.dask_expr._shuffle.P2PShuffleP2P worker-based shuffle implementation
class
dask.dataframe.dask_expr._shuffle.SetIndexAbstract ``set_index`` class.
class
dask.dataframe.dask_expr._shuffle.SetPartitionShuffles the DataFrame according to its new divisions.
class
dask.dataframe.dask_expr._shuffle.TaskShuffleStaged task-based shuffle implementation
class
dask.dataframe.dask_expr.io.io.FromPandasThe only way today to get a real dataframe
class
dask.dataframe.dask_expr.io.parquet.ReadParquetFSSpecRead a parquet dataset
class
dask.dataframe.groupby.AggregationUser defined groupby-aggregation.
class
dask.dataframe.io.orc.utils.ORCEngineThe API necessary to provide a new ORC reader/writer
func
dask.dataframe.io.parquet.core.get_engine(engine:Literal['auto', 'pyarrow'] | type[Engine]) -> type[Engine]Get the parquet engine backend implementation.
class
dask.dataframe.io.parquet.utils.EngineThe API necessary to provide a new Parquet reader/writer
func
dask.dataframe.methods.boundary_slice(df, start, stop, right_boundary=True, left_boundary=True)Index slice start/stop.
func
dask.dataframe.methods.loc(df, iindexer, cindexer=None).loc for known divisions
func
dask.dataframe.methods.try_loc(df, iindexer, cindexer=None).loc for unknown divisions
func
dask.dataframe.shuffle.ensure_cleanup_on_exception(p)Ensure a partd.File is cleaned up.
class
dask.dataframe.shuffle.maybe_buffered_partdIf serialized, will return non-buffered partd.
class
dask.dataframe.utils.AttributeNotImplementedErrorNotImplementedError and AttributeError
func
dask.dataframe.utils.clear_known_categories(x, cols=None, index=True, dtype_backend=None)Set categories to be unknown.
func
dask.dataframe.utils.index_summary(idx, name=None)Summarized representation of an Index.
func
dask.dataframe.utils.pyarrow_strings_enabled() -> boolConfig setting to convert objects to pyarrow strings
func
dask.dataframe.utils.valid_divisions(divisions)Are the provided divisions valid?
class
dask.delayed.DelayedRepresents a value to be computed by dask.
func
dask.delayed.tokenize(*pure=None, *args, **kwargs)Mapping function from task -> consistent name.
class
dask.diagnostics.profile.CacheProfilerA profiler for dask execution at the scheduler cache level.
method
dask.diagnostics.profile.CacheProfiler.clear()Clear out old results from profiler
class
dask.diagnostics.profile.ProfilerA profiler for dask execution at the task level.
method
dask.diagnostics.profile.Profiler.clear()Clear out old results from profiler
class
dask.diagnostics.profile.ResourceProfilerA profiler for resource use.
method
dask.diagnostics.profile.ResourceProfiler.close()Shutdown the resource tracker process
class
dask.diagnostics.progress.ProgressBarA progress bar for dask.
func
dask.diagnostics.progress.format_time(t)Format seconds into a human readable form.
func
dask.dot.dot_graph(dsk, filename='mydask', format=None, **kwargs)Render a task graph using dot.
func
dask.dot.has_sub_tasks(task)Returns True if the task has sub tasks
func
dask.dot.task_label(task)Label for a task on a dot graph.
class
dask.graph_manipulation.chunksCallables to be inserted in the Dask graph
method
dask.graph_manipulation.chunks.bind(node:T, *args, **kwargs) -> TDummy graph node of :func:`bind` and :func:`wait_on`.
method
dask.graph_manipulation.chunks.checkpoint(*args, **kwargs) -> NoneDummy graph node of :func:`checkpoint`.
method
dask.highlevelgraph.Layer.is_materialized() -> boolReturn whether the layer is materialized or not
class
dask.layers.ArrayChunkShapeDepProduce chunk shapes given a chunk index
class
dask.layers.ArrayOverlapLayerSimple HighLevelGraph array overlap layer.
class
dask.layers.ArraySliceDepProduce slice(s) into the full-sized array given a chunk index
class
dask.layers.CallableLazyImportFunction Wrapper for Lazy Importing.
func
dask.local.default_get_id()Default get_id
func
dask.local.fire_tasks(chunksize)Fire off a task to the thread pool
func
dask.local.identity(x)Identity function.
func
dask.multiprocessing.get_context()Return the current multiprocessing context.
func
dask.multiprocessing.remote_exception(exc:Exception, tb) -> ExceptionMetaclass that wraps exception type in RemoteException
func
dask.optimization.default_fused_linear_keys_renamer(keys)Create new keys for fused tasks
class
dask.rewrite.NodeA Discrimination Net node.
class
dask.rewrite.RewriteRuleA rewrite rule.
class
dask.rewrite.RuleSetA set of rewrite rules.
method
dask.rewrite.RuleSet.add(rule)Add a rule to the RuleSet.
method
dask.rewrite.RuleSet.rewrite(task, strategy='bottom_up')Apply the `RuleSet` to `task`.
class
dask.rewrite.TokenA token object.
class
dask.rewrite.TraverserTraverser interface for tasks.
method
dask.rewrite.Traverser.copy()Copy the traverser in its current state.
method
dask.rewrite.Traverser.next()Proceed to the next term in the preorder traversal.
func
dask.rewrite.args(task)Get the arguments for the current task
func
dask.rewrite.head(task)Return the top level node of a task
class
dask.sizeof.SimpleSizeofSentinel class to mark a class to be skipped by the dispatcher.
func
dask.system.cpu_count() -> intGet the available CPU count for this system.
class
dask.typing.DaskCollectionProtocol defining the interface of a Dask collection.
method
dask.typing.DaskCollection.compute(**kwargs:Any) -> AnyCompute this dask collection.
class
dask.typing.HLGDaskCollectionProtocol defining a Dask collection that uses HighLevelGraphs.
class
dask.utils.DispatchSimple single dispatch.
class
dask.utils.IndexCallableProvide getitem syntax for functions >>> def inc(x): ...
class
dask.utils.OperatorMethodMixinA mixin for dynamically implementing operators
func
dask.utils.cached_max(seq)Compute max with caching.
class
dask.utils.cached_propertyRead only version of functools.cached_property.
class
dask.utils.disable_gcContext manager to disable garbage collection.
func
dask.utils.ensure_bytes(s) -> bytesAttempt to turn `s` into bytes.
func
dask.utils.ensure_dict(d:Mapping[K, V], *copy:bool=False) -> dict[K, V]Convert a generic Mapping into a dict.
func
dask.utils.ensure_not_exists(filename) -> NoneEnsure that a file does not exist.
func
dask.utils.ensure_set(s:Set[T], *copy:bool=False) -> set[T]Convert a generic Set into a set.
func
dask.utils.format_time_ago(n:datetime) -> strCalculate a '3 hours ago' type string from a Python datetime.
func
dask.utils.funcname(func) -> strGet the name of a function.
func
dask.utils.get_named_args(func) -> list[str]Get all non ``*args/**kwargs`` arguments for a function
func
dask.utils.import_required(mod_name, error_msg)Attempt to import a required dependency.
func
dask.utils.is_arraylike(x) -> boolIs this object a numpy array or something similar?
func
dask.utils.is_dataframe_like(df) -> boolLooks like a Pandas DataFrame
func
dask.utils.is_empty(obj)Duck-typed check for “emptiness” of an object.
func
dask.utils.is_index_like(s) -> boolLooks like a Pandas Index
func
dask.utils.is_namedtuple_instance(obj:Any) -> boolReturns True if obj is an instance of a namedtuple.
func
dask.utils.is_series_like(s) -> boolLooks like a Pandas Series
class
dask.utils.itemgetterVariant of operator.itemgetter that supports equality tests
func
dask.utils.random_state_data(n:int, random_state=None) -> listReturn a list of arrays that can initialize ``np.random.RandomState``.
func
dask.utils.show_versions() -> NoneProvide version information for bug reports.
func
dask.utils.unzip(ls, nout)Unzip a list of lists into ``nout`` outputs.
この情報について
掲載しているシグネチャは dask/dask の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。