MCPcopy Index your code
hub / github.com/dask/dask / DataFrameIOLayer

Class DataFrameIOLayer

dask/layers.py:370–484  ·  view source on GitHub ↗

DataFrame-based Blockwise Layer with IO Parameters ---------- name : str Name to use for the constructed layer. columns : str, list or None Field name(s) to read in as columns in the output. inputs : list or BlockwiseDep List of arguments to be passed to

Source from the content-addressed store, hash-verified

368
369
370class DataFrameIOLayer(Blockwise):
371 """DataFrame-based Blockwise Layer with IO
372
373 Parameters
374 ----------
375 name : str
376 Name to use for the constructed layer.
377 columns : str, list or None
378 Field name(s) to read in as columns in the output.
379 inputs : list or BlockwiseDep
380 List of arguments to be passed to ``io_func`` so
381 that the materialized task to produce partition ``i``
382 will be: ``(<io_func>, inputs[i])``. Note that each
383 element of ``inputs`` is typically a tuple of arguments.
384 io_func : callable
385 A callable function that takes in a single tuple
386 of arguments, and outputs a DataFrame partition.
387 Column projection will be supported for functions
388 that satisfy the ``DataFrameIOFunction`` protocol.
389 label : str (optional)
390 String to use as a prefix in the place-holder collection
391 name. If nothing is specified (default), "subset-" will
392 be used.
393 produces_tasks : bool (optional)
394 Whether one or more elements of `inputs` is expected to
395 contain a nested task. This argument in only used for
396 serialization purposes, and will be deprecated in the
397 future. Default is False.
398 creation_info: dict (optional)
399 Dictionary containing the callable function ('func'),
400 positional arguments ('args'), and key-word arguments
401 ('kwargs') used to produce the dask collection with
402 this underlying ``DataFrameIOLayer``.
403 annotations: dict (optional)
404 Layer annotations to pass through to Blockwise.
405 """
406
407 def __init__(
408 self,
409 name,
410 columns,
411 inputs,
412 io_func,
413 label=None,
414 produces_tasks=False,
415 creation_info=None,
416 annotations=None,
417 ):
418 self.name = name
419 self._columns = columns
420 self.inputs = inputs
421 self.io_func = io_func
422 self.label = label
423 self.produces_tasks = produces_tasks
424 self.annotations = annotations
425 self.creation_info = creation_info
426
427 if not isinstance(inputs, BlockwiseDep):

Callers 1

project_columnsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…