Spool
Spool(
data = None,
)
A container of patches: a view over a PatchCatalog.
Constructed from in-memory patches directly (or via dascore.spool), from a directory of files with Spool.from_directory, or from a single file with Spool.from_file.
Parameters
| Parameter | Description |
|---|---|
| data |
A patch or sequence of patches this spool should hold, or another spool, whose catalog and provenance the new spool shares rather than copies; None creates an empty spool. |
Note
The catalog is the spool’s entire state: live patches sit in its resolver registry, file-backed patches in its index tables, and restructured views (chunk/concat) are derived in-memory catalogs whose rows are the plan outputs. Selection, ordering, and windowing are lazy specs composed on the catalog; one engine serves every construction path.
Methods
| Name | Description |
|---|---|
| attach_inventory | Attach a DASDAE inventory to this spool. |
| chunk | Chunk the data in the spool along specified dimension. |
| chunk_plan |
Return the plan chunk would execute, without touching any data.
|
| concatenate | Concatenate patches in order along a dimension. |
| conform_to_inventory | Return a spool the inventory describes exactly, patch for patch. |
| enrich | Enrich each patch this spool yields from an inventory. |
| expand_by | Expand the spool into one patch per value of an inventory coordinate. |
| from_directory | Create a spool over a directory of fiber files. |
| get_contents | Get a dataframe of the spool contents. |
| get_coverage | Return a dataframe summarizing how complete the spool is. |
| get_gaps | Return a dataframe with one row per gap along a dimension. |
| get_patch_names | Generates the default name of patch data. |
| from_file | Create a spool over a single (multi-patch capable) fiber file. |
| map | Map a function of all the contents of the spool. |
| remove_inventory | Return a spool carrying no inventory. |
| select | Sub-select parts of the spool. |
| sort | Sort the Spool based on a specific attribute. |
| split | Yield sub-patches based on specified parameters. |
| stack_patches | Stack (add) all patches compatible with first patch together. |
| unselect | Return the spool without the patches a selection would keep. |
| update | Updates the contents of the spool, return the updated spool. |