Yarn

Overview: Yarn

class Yarn(series: static_frame.core.series.Series, *, retain_labels: bool, hierarchy: Optional[static_frame.core.index_hierarchy.IndexHierarchy] = None, deepcopy_from_bus: bool = False)[source]

A Series-like container made of an ordered collection of Bus. If the labels of the index are unique accross all contained Bus, retain_labels can be set to False and underlying labels are simply concatenated; otherwise, retain_labels must be set to True and an additional depth-level is added to the index labels.

Yarn: Constructor

Overview: Yarn: Constructor

Yarn.__init__(series: static_frame.core.series.Series, *, retain_labels: bool, hierarchy: Optional[static_frame.core.index_hierarchy.IndexHierarchy] = None, deepcopy_from_bus: bool = False)None[source]
Parameters

series – A Series of Bus.

classmethod Yarn.from_buses(buses: Iterable[static_frame.core.bus.Bus], *, name: Optional[Hashable] = None, retain_labels: bool, deepcopy_from_bus: bool = False)static_frame.core.yarn.Yarn[source]

Return a Yarn from an iterable of Bus; labels will be drawn from Bus.name.

classmethod Yarn.from_concat(containers: Iterable[Union[static_frame.core.bus.Bus, static_frame.core.yarn.Yarn]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, name: Optional[Hashable] = <object object>, retain_labels: bool, deepcopy_from_bus: bool = False)static_frame.core.yarn.Yarn[source]

Concatenate multiple Bus into a new Yarn. Loaded status of Frame within each Bus will not be altered.

Parameters

index – Optionally provide new labels for each Bus. This is not the resultant index on the Yarn.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Exporter

Overview: Yarn: Exporter

Yarn.to_hdf5(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as an HDF5 table.

Parameters
Yarn.to_series()static_frame.core.series.Series[source]

Return a Series with the Frame contained in all contained Bus.

Yarn.to_sqlite(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as an SQLite database file.

Parameters
Yarn.to_visidata()None

Open an interactive VisiData session.

Yarn.to_xlsx(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as a XLSX workbook.

Parameters
Yarn.to_zip_csv(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as a zipped archive of CSV files.

Parameters
Yarn.to_zip_parquet(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as a zipped archive of parquet files.

Parameters
Yarn.to_zip_pickle(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as a zipped archive of pickles.

Parameters
Yarn.to_zip_tsv(fp: Union[str, os.PathLike], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None)None

Write the complete Bus as a zipped archive of TSV files.

Parameters

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Attribute

Overview: Yarn: Attribute

Yarn.STATIC: bool = True
Yarn.dtype

Return the dtype of the realized NumPy array.

Returns

numpy.dtype

Yarn.dtypes

Returns a Frame of dtypes for all loaded Frames.

Yarn.index

The index instance assigned to this container.

Returns

Index

Yarn.mloc

Returns a Series showing a tuple of memory locations within each loaded Frame.

Yarn.name

A hashable label attached to this container.

Returns

Hashable

Yarn.nbytes

Total bytes of data currently loaded in Bus contained in this Yarn.

Yarn.ndim

Return the number of dimensions, which for a Yarn is always 1.

Returns

int

Yarn.shape

Return a tuple describing the shape of the realized NumPy array.

Returns

Tuple[int]

Yarn.shapes

A Series describing the shape of each loaded Frame. Unloaded Frame will have a shape of None.

Returns

tp.Series

Yarn.size

Return the size of the underlying NumPy array.

Returns

int

Yarn.status

Return a Frame indicating loaded status, size, bytes, and shape of all loaded Frame in Bus contined in this Yarn.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Method

Overview: Yarn: Method

Yarn.__bool__()bool

Raises ValueError to prohibit ambiguous use of truethy evaluation.

Yarn.__len__()int[source]

Length of values.

Yarn.equals(other: Any, *, compare_name: bool = False, compare_dtype: bool = False, compare_class: bool = False, skipna: bool = True)bool[source]

Return a bool from comparison to any other object.

Note: this will attempt to load and compare all Frame managed by the Bus.

Parameters
  • compare_name – Include equality of the container’s name (and all composed containers) in the comparison.

  • compare_dtype – Include equality of the container’s dtype (and all composed containers) in the comparison.

  • compare_class – Include equality of the container’s class (and all composed containers) in the comparison.

  • skipna – If True, comparisons between missing values are equal.

Yarn.head(count: int = 5)static_frame.core.yarn.Yarn[source]

Return a Yarn consisting only of the top elements as specified by count.

Parameters

count – Number of elements to be returned from the top of the Yarn

Returns

Yarn

Yarn.rename(name: Optional[Hashable])static_frame.core.yarn.Yarn[source]

Return a new Yarn with an updated name attribute.

Parameters

name

Yarn.tail(count: int = 5)static_frame.core.yarn.Yarn[source]
Return a Yarn consisting only of the bottom elements as specified by count.

s

Parameters

count – Number of elements to be returned from the bottom of the Yarn

Returns

Yarn

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Dictionary-Like

Overview: Yarn: Dictionary-Like

Yarn.__contains__(value: Hashable)bool[source]

Inclusion of value in index labels.

Returns

bool

Yarn.__iter__()Iterator[Hashable][source]

Iterator of index labels, same as static_frame.Series.keys.

Returns

Iterator[Hashasble]

Yarn.__reversed__()Iterator[Hashable][source]

Returns a reverse iterator on the Yarn index.

Returns

Index

Yarn.get(key: Hashable, default: Optional[Any] = None)Any[source]

Return the value found at the index key, else the default if the key is not found.

Returns

Any

Yarn.items()Iterator[Tuple[Hashable, static_frame.core.frame.Frame]][source]

Iterator of pairs of Yarn label and contained Frame.

Yarn.keys()static_frame.core.index_base.IndexBase[source]

Iterator of index labels.

Returns

Iterator[Hashable]

Yarn.values

A 1D object array of all Frame contained in all contained Bus.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Display

Overview: Yarn: Display

Yarn.interface

A Frame documenting the interface of this class.

Yarn.__repr__()str

Return repr(self).

Yarn.__str__()

Return str(self).

Yarn.display(config: Optional[static_frame.core.display_config.DisplayConfig] = None, *, style_config: Optional[static_frame.core.style_config.StyleConfig] = None)static_frame.core.display.Display[source]

Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Yarn.display_tall(config: Optional[static_frame.core.display_config.DisplayConfig] = None)static_frame.core.display.Display

Maximize vertical presentation. Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Yarn.display_wide(config: Optional[static_frame.core.display_config.DisplayConfig] = None)static_frame.core.display.Display

Maximize horizontal presentation. Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Selector

Overview: Yarn: Selector

Yarn[key]
Yarn.__getitem__ = <function Yarn.__getitem__>[source]
Yarn.iloc[key]
Yarn.iloc
Yarn.loc[key]
Yarn.loc

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary

Yarn: Operator Binary

Overview: Yarn: Operator Binary

Yarn.__eq__(value, /)

Return self==value.

Yarn.__ge__(value, /)

Return self>=value.

Yarn.__gt__(value, /)

Return self>value.

Yarn.__le__(value, /)

Return self<=value.

Yarn.__lt__(value, /)

Return self<value.

Yarn.__ne__(value, /)

Return self!=value.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary