Yarn

Overview: Yarn

class Yarn(series: Union[static_frame.core.series.Series, Iterable[static_frame.core.bus.Bus]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None, deepcopy_from_bus: bool = False, hierarchy: Optional[static_frame.core.index_hierarchy.IndexHierarchy] = None, own_index: bool = False)[source]

A Series-like container made of an ordered collection of Bus. Yarn can be indexed independently of the contained Bus, permitting independent labels per contained Frame.

Yarn: Constructor

Overview: Yarn: Constructor

Yarn.__init__(series: Union[static_frame.core.series.Series, Iterable[static_frame.core.bus.Bus]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None, deepcopy_from_bus: bool = False, hierarchy: Optional[static_frame.core.index_hierarchy.IndexHierarchy] = None, own_index: bool = False)None[source]
Parameters
  • series – An iterable (or Series) of Bus. The length of this container is not the same as index, if provided.

  • index – Optionally provide an index for the Frame contained in all Bus.

  • index_constructor

  • deepcopy_from_bus

  • hierarchy

  • own_index

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[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>, 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
  • containers

  • index – Optionally provide new labels for the result of the concatenation.

  • name

  • deepcopy_from_bus

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | 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 | Iterator | 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 | Iterator | 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.rehierarch(depth_map: Sequence[int])static_frame.core.yarn.Yarn[source]

Return a new Series with new a hierarchy based on the supplied depth_map.

Yarn.relabel(index: Optional[Union[Callable[[], Any], Mapping[Hashable, Any], static_frame.core.series.Series, Type[static_frame.core.index_auto.IndexAutoFactory], static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]])static_frame.core.yarn.Yarn[source]

Return a new Yarn with transformed labels on the index. The size and ordering of the data is never changed in a relabeling operation. The resulting index must be unique.

Parameters

index – One of the following types, used to create a new Index with the same size as the previous index. (a) A mapping (as a dictionary or Series), used to lookup and transform the labels in the previous index. Previous labels not found in the mapping will be reused. (b) A function, returning a hashable, that is applied to each label in the previous index. (c) The IndexAutoFactory type, to apply an auto-incremented integer index. (d) An index initializer, i.e., either an iterable of hashables or an Index instance.

Yarn.relabel_flat()static_frame.core.yarn.Yarn[source]

Return a new Yarn, where an IndexHierarchy (if defined) is replaced with a flat, one-dimension index of tuples.

Yarn.relabel_level_add(level: Hashable)static_frame.core.yarn.Yarn[source]

Return a new Yarn, adding a new root level to an existing IndexHierarchy, or creating an IndexHierarchy if one is not yet defined.

Parameters

level – A hashable value to be used as a new root level, extending or creating an IndexHierarchy

Yarn.relabel_level_drop(count: int = 1)static_frame.core.yarn.Yarn[source]

Return a new Yarn, dropping one or more levels from a either the root or the leaves of an IndexHierarchy. The resulting index must be unique.

Parameters

count – A positive integer drops that many outer-most (root) levels; a negative integer drops that many inner-most (leaf)levels.

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.unpersist()None[source]

For the Bus contained in this object, replace all loaded Frame with FrameDeferred.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | 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 | Iterator | 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 | Iterator | Operator Binary

Yarn: Selector

Overview: Yarn: Selector

Yarn.drop[key]
Yarn.drop

Interface for dropping elements from Yarn.

InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray])Any[source]

Label-based selection.

Yarn.drop.iloc[key]
Yarn.drop

Interface for dropping elements from Yarn.

InterfaceSelectTrio.iloc

Integer-position based selection.

Yarn.drop.loc[key]
Yarn.drop

Interface for dropping elements from Yarn.

InterfaceSelectTrio.loc

Label-based selection.

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 | Iterator | Operator Binary

Yarn: Iterator

Overview: Yarn: Iterator

Yarn.iter_element
iter_element

Iterator of elements.

Yarn.iter_element().apply(func, *, dtype, name, index_constructor)
iter_element

Iterator of elements.

IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element().apply_iter(func)
iter_element

Iterator of elements.

IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Yarn.iter_element().apply_iter_items(func)
iter_element

Iterator of elements.

IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Yarn.iter_element().apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
iter_element

Iterator of elements.

IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Yarn.iter_element().map_all(mapping, *, dtype, name, index_constructor)
iter_element

Iterator of elements.

IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element().map_all_iter(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element().map_all_iter_items(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element().map_any(mapping, *, dtype, name, index_constructor)
iter_element

Iterator of elements.

IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element().map_any_iter(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element().map_any_iter_items(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element().map_fill(mapping, *, fill_value, dtype, name, index_constructor)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element().map_fill_iter(mapping, *, fill_value)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Yarn.iter_element().map_fill_iter_items(mapping, *, fill_value)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Yarn.iter_element_items
iter_element_items

Iterator of label, element pairs.

Yarn.iter_element_items().apply(func, *, dtype, name, index_constructor)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element_items().apply_iter(func)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Yarn.iter_element_items().apply_iter_items(func)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Yarn.iter_element_items().apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Yarn.iter_element_items().map_all(mapping, *, dtype, name, index_constructor)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element_items().map_all_iter(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element_items().map_all_iter_items(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element_items().map_any(mapping, *, dtype, name, index_constructor)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element_items().map_any_iter(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element_items().map_any_iter_items(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Yarn.iter_element_items().map_fill(mapping, *, fill_value, dtype, name, index_constructor)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], IndexBase]] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Yarn.iter_element_items().map_fill_iter(mapping, *, fill_value)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Yarn.iter_element_items().map_fill_iter_items(mapping, *, fill_value)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Yarn: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | 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 | Iterator | Operator Binary