IndexHierarchy

Overview: IndexHierarchy

class IndexHierarchy(levels: Union[static_frame.core.index_level.IndexLevel, static_frame.core.index_hierarchy.IndexHierarchy], *, name: Optional[Hashable] = <object object>, blocks: Optional[static_frame.core.type_blocks.TypeBlocks] = None, own_blocks: bool = False)[source]

A hierarchy of Index objects, defined as a strict tree of uniform depth across all branches.

IndexHierarchy: Constructor

Overview: IndexHierarchy: Constructor

IndexHierarchy.__init__(levels: Union[static_frame.core.index_level.IndexLevel, static_frame.core.index_hierarchy.IndexHierarchy], *, name: Optional[Hashable] = <object object>, blocks: Optional[static_frame.core.type_blocks.TypeBlocks] = None, own_blocks: bool = False)[source]

Initializer.

Parameters

levelsIndexLevels instance, or, optionally, an :obj`IndexHierarchy` to be used to construct a new :obj`IndexHierarchy`.

classmethod IndexHierarchy.from_index_items(items: Iterable[Tuple[Hashable, static_frame.core.index.Index]], *, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None, name: Optional[Hashable] = None)IH[source]

Given an iterable of pairs of label, Index, produce an IndexHierarchy where the labels are depth 0, the indices are depth 1.

Parameters
  • items – iterable of pairs of label, Index.

  • index_constructor – Optionally provide index constructor for outermost index.

classmethod IndexHierarchy.from_labels(labels: Iterable[Sequence[Hashable]], *, name: Optional[Hashable] = None, reorder_for_hierarchy: bool = False, index_constructors: Optional[Sequence[Callable[[...], static_frame.core.index_base.IndexBase]]] = None, depth_reference: Optional[int] = None, continuation_token: Optional[Hashable] = <object object>)IH[source]

Construct an IndexHierarhcy from an iterable of labels, where each label is tuple defining the component labels for all hierarchies.

Parameters
  • labels – an iterator or generator of tuples.

  • reorder_for_hierarchy – reorder the labels to produce a hierarchable Index, assuming hierarchability is possible.

  • continuation_token – a Hashable that will be used as a token to identify when a value in a label should use the previously encountered value at the same depth.

Returns

static_frame.IndexHierarchy

>>> sf.IndexHierarchy.from_labels((('lepton', 'electron'), ('lepton', 'muon'), ('quark', 'up'), ('quark', 'down')))
<IndexHierarchy>
lepton           electron
lepton           muon
quark            up
quark            down
<<U6>            <<U8>

classmethod IndexHierarchy.from_labels_delimited(labels: Iterable[str], *, delimiter: str = ' ', name: Optional[Hashable] = None, index_constructors: Optional[Sequence[Callable[[], static_frame.core.index_base.IndexBase]]] = None)IH[source]

Construct an IndexHierarchy from an iterable of labels, where each label is string defining the component labels for all hierarchies using a string delimiter. All components after splitting the string by the delimited will be literal evaled to produce proper types; thus, strings must be quoted.

Parameters

labels – an iterator or generator of tuples.

Returns

static_frame.IndexHierarchy

classmethod IndexHierarchy.from_names(names: Iterable[Hashable])IH[source]

Construct a zero-length IndexHierarchy from an iterable of names, where the length of names defines the zero-length depth.

Parameters

names – Iterable of hashable names per depth.

classmethod IndexHierarchy.from_pandas(value: pandas.Index)IndexBase

Given a Pandas index, return the appropriate IndexBase derived class.

classmethod IndexHierarchy.from_product(*levels: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], name: Optional[Hashable] = None)IH[source]

Given groups of iterables, return an IndexHierarchy made of the product of a values in those groups, where the first group is the top-most hierarchy.

Returns

static_frame.IndexHierarchy

classmethod IndexHierarchy.from_tree(tree: Any, *, name: Optional[Hashable] = None)IH[source]

Convert into a IndexHierarchy a dictionary defining keys to either iterables or nested dictionaries of the same.

Returns

static_frame.IndexHierarchy

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Exporter

Overview: IndexHierarchy: Exporter

IndexHierarchy.to_frame()Frame[source]

Return Frame version of this IndexHiearchy.

IndexHierarchy.to_frame_go()FrameGO[source]

Return a FrameGO version of this IndexHierarchy.

IndexHierarchy.to_html(config: Optional[static_frame.core.display_config.DisplayConfig] = None, style_config: Optional[static_frame.core.style_config.StyleConfig] = <static_frame.core.style_config.StyleConfig object>)str

Return an HTML table representation of this Index using standard TABLE, TR, and TD tags. This is not a complete HTML page.

Parameters

config – Optional DisplayConfig instance.

Returns

str

IndexHierarchy.to_html_datatables(fp: Optional[Union[str, os.PathLike, TextIO]] = None, *, show: bool = True, config: Optional[static_frame.core.display_config.DisplayConfig] = None)Optional[str]

Return a complete HTML representation of this Index using the DataTables JS library for table naviagation and search. The page links to CDNs for JS resources, and thus will not fully render without an internet connection.

Parameters
  • fp – optional file path to write; if not provided, a temporary file will be created. Note: the caller is responsible for deleting this file.

  • show – if True, the file will be opened with a webbrowser.

  • config – Optional DisplayConfig instance.

Returns

str, absolute file path to the file written.

IndexHierarchy.to_pandas()DataFrame[source]

Return a Pandas MultiIndex.

IndexHierarchy.to_visidata()None

Open an interactive VisiData session.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Attribute

Overview: IndexHierarchy: Attribute

IndexHierarchy.STATIC: bool = True
IndexHierarchy.depth: int
IndexHierarchy.dtypes

Return a Series of dytpes for each index depth.

Returns

static_frame.Series

IndexHierarchy.index_types

Return a Series of Index classes for each index depth.

Returns

static_frame.Series

IndexHierarchy.mloc

The memory location, represented as an integer, of the underlying NumPy array.

IndexHierarchy.name

A hashable label attached to this container.

Returns

Hashable

IndexHierarchy.names

Provide a suitable iterable of names for usage in output formats that require a field name as string for the index.

IndexHierarchy.nbytes

Return the total bytes of the underlying NumPy array.

Returns

int

IndexHierarchy.ndim

Return the number of dimensions.

Returns

int

IndexHierarchy.positions: np.ndarray

Return the immutable positions array.

IndexHierarchy.shape

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

Returns

tp.Tuple[int]

IndexHierarchy.size

Return the size of the underlying NumPy array.

Returns

int

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Method

Overview: IndexHierarchy: Method

IndexHierarchy.__bool__()bool

Raises ValueError to prohibit ambiguous use of truethy evaluation.

IndexHierarchy.__copy__()IH[source]

Return a shallow copy of this IndexHierarchy.

IndexHierarchy.__deepcopy__(memo: Dict[int, Any])IH[source]
IndexHierarchy.__len__()int[source]
IndexHierarchy.all(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Logical and over values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.any(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Logical or over values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.astype[key](dtypes, *, consolidate_blocks)
IndexHierarchy.astype

Retype one or more depths. Can be used as as function to retype the entire IndexHierarchy; alternatively, a __getitem__ interface permits retyping selected depths.

Parameters

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

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

Selector of columns by label.

Parameters

key – A loc selector, either a label, a list of labels, a slice of labels, or a Boolean array.

IndexHierarchy.astype(dtype)
astype

Retype one or more depths. Can be used as as function to retype the entire IndexHierarchy; alternatively, a __getitem__ interface permits retyping selected depths.

Parameters

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

InterfaceAsType.__call__(dtype: numpy.dtype)Frame[source]

Apply a single dtype to all columns.

IndexHierarchy.copy()IH[source]

Return a shallow copy of this IndexHierarchy.

IndexHierarchy.cumprod(axis: int = 0, skipna: bool = True)Any

Return the cumulative product over the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.cumsum(axis: int = 0, skipna: bool = True)Any

Return the cumulative sum over the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.difference(other: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable]])I

Perform difference with another Index, container, or NumPy array. Retains order.

IndexHierarchy.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.

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.

IndexHierarchy.fillna(value: Any)static_frame.core.index_hierarchy.IndexHierarchy[source]

Return an IndexHierarchy after replacing NA (NaN or None) with the supplied value.

Parameters

value – Value to be used to replace missing values (NaN or None).

IndexHierarchy.flat()static_frame.core.index_base.IndexBase[source]

Return a flat, one-dimensional index of tuples for each level.

IndexHierarchy.head(count: int = 5)I

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

Parameters

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

IndexHierarchy.iloc_searchsorted(values: Any, *, side_left: bool = True)Union[Hashable, Iterable[Hashable]][source]

Given a sorted Series, return the iloc (integer) position(s) at which insertion in values would retain sort order.

Parameters
  • values – a single value, or iterable of values.

  • side_left – If True, the index of the first suitable location found is given, else return the last such index. If matching an existing value, side_left==True will return that position, side_left==Right will return the next position (or the length).

IndexHierarchy.intersection(*others: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable]])I

Perform intersection with one or many Index, container, or NumPy array. Identical comparisons retain order.

IndexHierarchy.isin(other: Iterable[Iterable[Hashable]])numpy.ndarray[source]

Return a Boolean array showing True where one or more of the passed in iterable of labels is found in the index.

IndexHierarchy.label_widths_at_depth(depth_level: Union[int, Iterable[int]] = 0)Iterator[Tuple[Hashable, int]][source]

A generator of pairs, where each pair is the label and the count of that label found at the depth specified by depth_level.

Parameters

depth_level – a depth level, starting from zero.

IndexHierarchy.level_add(level: Hashable)IH[source]

Return an IndexHierarchy with a new root (outer) level added.

IndexHierarchy.level_drop(count: int = 1)Union[static_frame.core.index.Index, static_frame.core.index_hierarchy.IndexHierarchy][source]

Return an IndexHierarchy with one or more leaf levels removed. This might change the size of the resulting index if the resulting levels are not unique.

Parameters

count – A positive value is the number of depths to remove from the root (outer) side of the hierarchy; a negative value is the number of depths to remove from the leaf (inner) side of the hierarchy.

IndexHierarchy.loc_searchsorted(values: Any, *, side_left: bool = True, fill_value: Any = nan)Union[Hashable, Iterable[Hashable]][source]

Given a sorted Series, return the loc (label) position(s) at which insertion in values would retain sort order.

Parameters
  • values – a single value, or iterable of values.

  • side_left – If True, the index of the first suitable location found is given, else return the last such index. If matching an existing value, side_left==True will return that position, side_left==Right will return the next position (or the length).

  • fill_value – A value to be used to fill the label beyond the last label.

IndexHierarchy.loc_to_iloc(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray, static_frame.core.hloc.HLoc])Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray][source]

Given a label (loc) style key (either a label, a list of labels, a slice, or a Boolean selection), return the index position (iloc) style key. Keys that are not found will raise a KeyError or a sf.LocInvalid error.

Parameters

key – a label key.

IndexHierarchy.max(axis: int = 0, skipna: bool = True)Any

Return the maximum along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.mean(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the mean along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.median(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the median along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.min(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the minimum along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.prod(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the product along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.rehierarch(depth_map: Sequence[int])IH[source]

Return a new IndexHierarchy that conforms to the new depth assignments given be depth_map.

IndexHierarchy.relabel(mapper: Union[Callable[[], Any], Mapping[Hashable, Any], Series, Type[static_frame.core.index_auto.IndexAutoFactory], IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]])IndexHierarchy[source]

Return a new IndexHierarchy with labels replaced by the callable or mapping; order will be retained. If a mapping is used, the mapping should map tuple representation of labels, and need not map all origin keys.

IndexHierarchy.rename(name: Optional[Hashable])IH[source]

Return a new Frame with an updated name attribute.

IndexHierarchy.roll(shift: int)static_frame.core.index_hierarchy.IndexHierarchy[source]

Return an IndexHierarchy with values rotated forward and wrapped around (with a positive shift) or backward and wrapped around (with a negative shift).

IndexHierarchy.sample(count: int = 1, *, seed: Optional[int] = None)I

Randomly (optionally made deterministic with a fixed seed) extract items from the container to return a subset of the container.

Parameters
  • of elements to select. (Number) –

  • state of random selection. (Initial) –

IndexHierarchy.sort(*, ascending: Union[bool, Iterable[bool]] = True, kind: str = 'mergesort', key: Optional[Callable[[static_frame.core.index_hierarchy.IndexHierarchy], Union[numpy.ndarray, static_frame.core.index_hierarchy.IndexHierarchy]]] = None)IH[source]

Return a new Index with the labels sorted.

Parameters
  • ascending – Boolean, or iterable of Booleans; if True, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default is True.

  • kind – Name of the sort algorithm as passed to NumPy.

  • key – A function that is used to pre-process the selected columns or rows and derive new values to sort by.

IndexHierarchy.std(axis: int = 0, skipna: bool = True, ddof: int = 0, out: Optional[numpy.ndarray] = None)Any

Return the standard deviaton along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.sum(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Sum values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy.tail(count: int = 5)I

Return a Index consisting only of the bottom elements as specified by count.

Parameters

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

IndexHierarchy.union(*others: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable]])I

Perform union with another Index, container, or NumPy array. Identical comparisons retain order.

IndexHierarchy.unique(depth_level: Union[int, Iterable[int]] = 0)numpy.ndarray[source]

Return a NumPy array of unique values.

Parameters

depth_level – Specify a single depth or multiple depths in an iterable.

Returns

numpy.ndarray

IndexHierarchy.values_at_depth(depth_level: Union[int, Iterable[int]] = 0)numpy.ndarray[source]

Return an NP array for the depth_level specified.

Parameters

depth_level – a single depth level, or iterable depth of depth levels.

IndexHierarchy.var(axis: int = 0, skipna: bool = True, ddof: int = 0, out: Optional[numpy.ndarray] = None)Any

Return the variance along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Dictionary-Like

Overview: IndexHierarchy: Dictionary-Like

IndexHierarchy.__contains__(value: Tuple[Hashable])bool[source]

Determine if a leaf loc is contained in this Index.

IndexHierarchy.__iter__()Iterator[Tuple[Hashable, ]][source]

Iterate over labels.

IndexHierarchy.__reversed__()Iterator[Tuple[Hashable, ]][source]

Returns a reverse iterator on the index labels.

IndexHierarchy.values: np.ndarray

A 2D NumPy array of all values in the IndexHierarchy. As this is a single array, heterogenous columnar types might be coerced to a compatible type.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Display

Overview: IndexHierarchy: Display

IndexHierarchy.interface

A Frame documenting the interface of this class.

>>> sf.IndexHierarchy.interface.loc[sf.IndexHierarchy.interface.index.via_str.startswith('from_')]
<Frame: IndexHierarchy>
<Index>                              cls_name       group       doc                  <<U18>
<Index: signature>
from_index_items(items, *, index_... IndexHierarchy Constructor Given an iterable...
from_labels(labels, *, name, reor... IndexHierarchy Constructor Construct an Inde...
from_labels_delimited(labels, *, ... IndexHierarchy Constructor Construct an Inde...
from_names(names)                    IndexHierarchy Constructor Construct a zero-...
from_pandas(value)                   IndexHierarchy Constructor Given a Pandas in...
from_product(*, name, *levels)       IndexHierarchy Constructor Given groups of i...
from_tree(tree, *, name)             IndexHierarchy Constructor Convert into a In...
<<U68>                               <<U14>         <<U27>      <<U83>

IndexHierarchy.__repr__()str

Return repr(self).

IndexHierarchy.__str__()

Return str(self).

IndexHierarchy.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.

IndexHierarchy.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.

IndexHierarchy.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.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Selector

Overview: IndexHierarchy: Selector

IndexHierarchy[key]
IndexHierarchy.__getitem__ = <function IndexHierarchy.__getitem__>[source]
IndexHierarchy.iloc[key]
IndexHierarchy.iloc: tp.Any
IndexHierarchy.loc[key]
IndexHierarchy.loc: tp.Any

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Iterator

Overview: IndexHierarchy: Iterator

IndexHierarchy.iter_label(depth_level)
iter_label
IndexHierarchy.iter_label(depth_level).apply(func, *, dtype, name)
iter_label
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = 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.

IndexHierarchy.iter_label(depth_level).apply_iter(func)
iter_label
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.

IndexHierarchy.iter_label(depth_level).apply_iter_items(func)
iter_label
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.

IndexHierarchy.iter_label(depth_level).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_label
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = 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.

IndexHierarchy.iter_label(depth_level).map_all(mapping, *, dtype, name)
iter_label
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = 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.

IndexHierarchy.iter_label(depth_level).map_all_iter(mapping)
iter_label
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.

IndexHierarchy.iter_label(depth_level).map_all_iter_items(mapping)
iter_label
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.

IndexHierarchy.iter_label(depth_level).map_any(mapping, *, dtype, name)
iter_label
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = 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.

IndexHierarchy.iter_label(depth_level).map_any_iter(mapping)
iter_label
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.

IndexHierarchy.iter_label(depth_level).map_any_iter_items(mapping)
iter_label
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.

IndexHierarchy.iter_label(depth_level).map_fill(mapping, *, fill_value, dtype, name)
iter_label
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)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.

IndexHierarchy.iter_label(depth_level).map_fill_iter(mapping, *, fill_value)
iter_label
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.

IndexHierarchy.iter_label(depth_level).map_fill_iter_items(mapping, *, fill_value)
iter_label
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.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Operator Binary

Overview: IndexHierarchy: Operator Binary

IndexHierarchy.__add__(other: Any)Any
IndexHierarchy.__and__(other: Any)Any
IndexHierarchy.__eq__(other: Any)Any

Return self==value.

IndexHierarchy.__floordiv__(other: Any)Any
IndexHierarchy.__ge__(other: Any)Any

Return self>=value.

IndexHierarchy.__gt__(other: Any)Any

Return self>value.

IndexHierarchy.__le__(other: Any)Any

Return self<=value.

IndexHierarchy.__lt__(other: Any)Any

Return self<value.

IndexHierarchy.__matmul__(other: Any)Any
IndexHierarchy.__mod__(other: Any)Any
IndexHierarchy.__mul__(other: Any)Any
IndexHierarchy.__ne__(other: Any)Any

Return self!=value.

IndexHierarchy.__or__(other: Any)Any
IndexHierarchy.__pow__(other: Any)Any
IndexHierarchy.__radd__(other: Any)Any
IndexHierarchy.__rfloordiv__(other: Any)Any
IndexHierarchy.__rmatmul__(other: Any)Any
IndexHierarchy.__rmul__(other: Any)Any
IndexHierarchy.__rshift__(other: Any)Any
IndexHierarchy.__rsub__(other: Any)Any
IndexHierarchy.__rtruediv__(other: Any)Any
IndexHierarchy.__sub__(other: Any)Any
IndexHierarchy.__truediv__(other: Any)Any
IndexHierarchy.__xor__(other: Any)Any

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Operator Unary

Overview: IndexHierarchy: Operator Unary

IndexHierarchy.__abs__()static_frame.core.container.ContainerOperand
IndexHierarchy.__invert__()static_frame.core.container.ContainerOperand
IndexHierarchy.__neg__()static_frame.core.container.ContainerOperand
IndexHierarchy.__pos__()static_frame.core.container.ContainerOperand

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Accessor Datetime

Overview: IndexHierarchy: Accessor Datetime

IndexHierarchy.via_dt.year
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.year

Return the year of each element.

IndexHierarchy.via_dt.month
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.month

Return the month of each element, between 1 and 12 inclusive.

IndexHierarchy.via_dt.day
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.day

Return the day of each element, between 1 and the number of days in the given month of the given year.

IndexHierarchy.via_dt.weekday
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.weekday()TContainer[source]

Return the day of the week as an integer, where Monday is 0 and Sunday is 6.

IndexHierarchy.via_dt.timetuple
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.timetuple()TContainer[source]

Return a time.struct_time such as returned by time.localtime().

IndexHierarchy.via_dt.fromisoformat
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.fromisoformat()TContainer[source]

Return a datetime.date object from an ISO 8601 format.

IndexHierarchy.via_dt.isoformat(sep, timespec)
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.isoformat(sep: str = 'T', timespec: str = 'auto')TContainer[source]

Return a string representing the date in ISO 8601 format, YYYY-MM-DD.

IndexHierarchy.via_dt.strftime(format)
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strftime(format: str)TContainer[source]

Return a string representing the date, controlled by an explicit format string.

IndexHierarchy.via_dt.strptime(format)
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strptime(format: str)TContainer[source]

Return a Python datetime object from parsing a string defined with format.

IndexHierarchy.via_dt.strpdate(format)
IndexHierarchy.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strpdate(format: str)TContainer[source]

Return a Python date object from parsing a string defined with format.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Accessor String

Overview: IndexHierarchy: Accessor String

IndexHierarchy.via_str.capitalize
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.capitalize()TContainer[source]

Return a container with only the first character of each element capitalized.

IndexHierarchy.via_str.center(width, fillchar)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.center(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements centered in a string of length width.

IndexHierarchy.via_str.count(sub, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.count(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring sub in the optional range start, end.

IndexHierarchy.via_str.decode(encoding, errors)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.decode(encoding: Optional[str] = None, errors: Optional[str] = None)TContainer[source]

Apply str.decode() to each element. Elements must be bytes.

IndexHierarchy.via_str.encode(encoding, errors)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.encode(encoding: Optional[str] = None, errors: Optional[str] = None)TContainer[source]

Apply str.encode() to each element. Elements must be strings.

IndexHierarchy.via_str.endswith(suffix, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.endswith(suffix: Union[str, Iterable[str]], start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring suffix (or an interable of suffixes) in the optional range start, end.

IndexHierarchy.via_str.find(sub, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.find(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

For each element, return the lowest index in the string where substring sub is found.

IndexHierarchy.via_str.index(sub, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.index(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Like find, but raises ValueError when the substring is not found.

IndexHierarchy.via_str.isalnum
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalnum()TContainer[source]

Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise.

IndexHierarchy.via_str.isalpha
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalpha()TContainer[source]

Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise.

IndexHierarchy.via_str.isdecimal
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdecimal()TContainer[source]

For each element, return True if there are only decimal characters in the element.

IndexHierarchy.via_str.isdigit
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdigit()TContainer[source]

Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise.

IndexHierarchy.via_str.islower
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.islower()TContainer[source]

Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.

IndexHierarchy.via_str.isnumeric
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isnumeric()TContainer[source]

For each element in self, return True if there are only numeric characters in the element.

IndexHierarchy.via_str.isspace
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isspace()TContainer[source]

Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise.

IndexHierarchy.via_str.istitle
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.istitle()TContainer[source]

Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise.

IndexHierarchy.via_str.isupper
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isupper()TContainer[source]

Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise.

IndexHierarchy.via_str.ljust(width, fillchar)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.ljust(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements ljusted in a string of length width.

IndexHierarchy.via_str.len
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.len()TContainer[source]

Return the length of the string.

IndexHierarchy.via_str.lower
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lower()TContainer[source]

Return an array with the elements of self converted to lowercase.

IndexHierarchy.via_str.lstrip(chars)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lstrip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the leading characters removed.

IndexHierarchy.via_str.partition(sep)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.partition(sep: str)TContainer[source]

Partition each element around sep.

IndexHierarchy.via_str.replace(old, new, count)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.replace(old: str, new: str, count: Optional[int] = None)TContainer[source]

Return a container with its elements replaced in a string of length width.

IndexHierarchy.via_str.rfind(sub, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rfind(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

For each element, return the highest index in the string where substring sub is found, such that sub is contained within start, end.

IndexHierarchy.via_str.rindex(sub, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rindex(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Like rfind, but raises ValueError when the substring sub is not found.

IndexHierarchy.via_str.rjust(width, fillchar)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rjust(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements rjusted in a string of length width.

IndexHierarchy.via_str.rpartition(sep)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rpartition(sep: str)TContainer[source]

Partition (split) each element around the right-most separator.

IndexHierarchy.via_str.rsplit(sep, maxsplit)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rsplit(sep: str, maxsplit: int = - 1)TContainer[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

IndexHierarchy.via_str.rstrip(chars)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rstrip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the trailing characters removed.

IndexHierarchy.via_str.split(sep, maxsplit)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.split(sep: str, maxsplit: int = - 1)TContainer[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

IndexHierarchy.via_str.startswith(prefix, start, end)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.startswith(prefix: Union[str, Iterable[str]], start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring prefix (or an interable of prefixes) in the optional range start, end.

IndexHierarchy.via_str.strip(chars)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.strip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the leading and trailing characters removed.

IndexHierarchy.via_str.swapcase
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.swapcase()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

IndexHierarchy.via_str.title
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.title()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

IndexHierarchy.via_str.upper
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.upper()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

IndexHierarchy.via_str.zfill(width)
IndexHierarchy.via_str

Interface for applying string methods to elements in this container.

InterfaceString.zfill(width: int)TContainer[source]

Return the string left-filled with zeros.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Accessor Transpose

Overview: IndexHierarchy: Accessor Transpose

IndexHierarchy.via_T.via_fill_value(fill_value)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.via_fill_value(fill_value: object)InterfaceFillValue[Frame][source]

Interface for using binary operators and methods with a pre-defined fill value.

IndexHierarchy.via_T.__add__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__add__(other: Any)Any[source]
IndexHierarchy.via_T.__sub__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__sub__(other: Any)Any[source]
IndexHierarchy.via_T.__mul__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__mul__(other: Any)Any[source]
IndexHierarchy.via_T.__truediv__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__truediv__(other: Any)Any[source]
IndexHierarchy.via_T.__floordiv__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__floordiv__(other: Any)Any[source]
IndexHierarchy.via_T.__mod__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__mod__(other: Any)Any[source]
IndexHierarchy.via_T.__pow__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__pow__(other: Any)Any[source]
IndexHierarchy.via_T.__lshift__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__lshift__(other: Any)Any[source]
IndexHierarchy.via_T.__rshift__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__rshift__(other: Any)Any[source]
IndexHierarchy.via_T.__and__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__and__(other: Any)Any[source]
IndexHierarchy.via_T.__xor__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__xor__(other: Any)Any[source]
IndexHierarchy.via_T.__or__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__or__(other: Any)Any[source]
IndexHierarchy.via_T.__lt__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__lt__(other: Any)Any[source]

Return self<value.

IndexHierarchy.via_T.__le__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__le__(other: Any)Any[source]

Return self<=value.

IndexHierarchy.via_T.__eq__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__eq__(other: Any)Any[source]

Return self==value.

IndexHierarchy.via_T.__ne__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__ne__(other: Any)Any[source]

Return self!=value.

IndexHierarchy.via_T.__gt__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__gt__(other: Any)Any[source]

Return self>value.

IndexHierarchy.via_T.__ge__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__ge__(other: Any)Any[source]

Return self>=value.

IndexHierarchy.via_T.__radd__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__radd__(other: Any)Any[source]
IndexHierarchy.via_T.__rsub__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__rsub__(other: Any)Any[source]
IndexHierarchy.via_T.__rmul__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__rmul__(other: Any)Any[source]
IndexHierarchy.via_T.__rtruediv__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__rtruediv__(other: Any)Any[source]
IndexHierarchy.via_T.__rfloordiv__(other)
IndexHierarchy.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

InterfaceTranspose.__rfloordiv__(other: Any)Any[source]

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression

IndexHierarchy: Accessor Regular Expression

Overview: IndexHierarchy: Accessor Regular Expression

IndexHierarchy.via_re(pattern, flags).search(pos, endpos)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.search(pos: int = 0, endpos: Optional[int] = None)TContainer[source]

Scan through string looking for the first location where this regular expression produces a match and return True, else False. Note that this is different from finding a zero-length match at some point in the string.

Parameters
  • pos – Gives an index in the string where the search is to start; it defaults to 0.

  • endpos – Limits how far the string will be searched; it will be as if the string is endpos characters long.

IndexHierarchy.via_re(pattern, flags).match(pos, endpos)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.match(pos: int = 0, endpos: Optional[int] = None)TContainer[source]

If zero or more characters at the beginning of string match this regular expression return True, else False. Note that this is different from a zero-length match.

Parameters
  • pos – Gives an index in the string where the search is to start; it defaults to 0.

  • endpos – Limits how far the string will be searched; it will be as if the string is endpos characters long.

IndexHierarchy.via_re(pattern, flags).fullmatch(pos, endpos)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.fullmatch(pos: int = 0, endpos: Optional[int] = None)TContainer[source]

If the whole string matches this regular expression, return True, else False. Note that this is different from a zero-length match.

Parameters
  • pos – Gives an index in the string where the search is to start; it defaults to 0.

  • endpos – Limits how far the string will be searched; it will be as if the string is endpos characters long.

IndexHierarchy.via_re(pattern, flags).split(maxsplit)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.split(maxsplit: int = 0)TContainer[source]

Split string by the occurrences of pattern. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting tuple.

Parameters

maxsplit – If nonzero, at most maxsplit splits occur, and the remainder of the string is returned as the final element of the tuple.

IndexHierarchy.via_re(pattern, flags).findall(pos, endpos)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.findall(pos: int = 0, endpos: Optional[int] = None)TContainer[source]

Return all non-overlapping matches of pattern in string, as a tuple of strings. The string is scanned left-to-right, and matches are returned in the order found. If one or more groups are present in the pattern, return a tuple of groups; this will be a tuple of tuples if the pattern has more than one group. Empty matches are included in the result.

Parameters
  • pos – Gives an index in the string where the search is to start; it defaults to 0.

  • endpos – Limits how far the string will be searched; it will be as if the string is endpos characters long.

IndexHierarchy.via_re(pattern, flags).sub(repl, count)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.sub(repl: str, count: int = 0)TContainer[source]

Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. If the pattern is not found, the string is returned unchanged.

Parameters
  • repl – A string or a function; if it is a string, any backslash escapes in it are processed.

  • count – The optional argument count is the maximum number of pattern occurrences to be replaced; count must be a non-negative integer. If omitted or zero, all occurrences will be replaced.

IndexHierarchy.via_re(pattern, flags).subn(repl, count)
via_re = <function IndexHierarchy.via_re>[source]
InterfaceRe.subn(repl: str, count: int = 0)TContainer[source]

Perform the same operation as sub(), but return a tuple (new_string, number_of_subs_made).

Parameters
  • repl – A string or a function; if it is a string, any backslash escapes in it are processed.

  • count – The optional argument count is the maximum number of pattern occurrences to be replaced; count must be a non-negative integer. If omitted or zero, all occurrences will be replaced.

IndexHierarchy: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression