dataframe_to_patch

function of dascore.utils.pd source

dataframe_to_patch(
    df: DataFrame ,
    attrs: dascore.core.attrs.PatchAttrs | collections.abc.Mapping | None[PatchAttrs, Mapping, None] = None,
)-> ‘PatchType’

Convert a dataframe to a patch.

Dimension names are either taken as the names of the index and columns or they must be provided in the attrs argument.

Parameters

Parameter Description
df The input dataframe to convert to a patch
attrs Extra attributes to attach to the patch.