Bus¶
Overview: Bus
- class Bus(frames: Optional[Iterable[Union[static_frame.core.frame.Frame, Type[static_frame.core.bus.FrameDeferred]]]], *, index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, name: Optional[Hashable] = <object object>, store: Optional[static_frame.core.store.Store] = None, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None, max_persist: Optional[int] = None, own_index: bool = False, own_data: bool = False)[source]¶
A randomly-accessible container of
Frame
. When created from a multi-table storage format (such as a zip-pickle or XLSX), a Bus will lazily read in components as they are accessed. When combined with themax_persist
parameter, a Bus will not hold on to more thanmax_persist
references, permitting low-memory reading of collections ofFrame
.
Bus: Constructor¶
Overview: Bus: Constructor
- Bus.__init__(frames: Optional[Iterable[Union[static_frame.core.frame.Frame, Type[static_frame.core.bus.FrameDeferred]]]], *, index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, name: Optional[Hashable] = <object object>, store: Optional[static_frame.core.store.Store] = None, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None, max_persist: Optional[int] = None, own_index: bool = False, own_data: bool = False)[source]
Default Bus constructor.
{args}
- classmethod Bus.from_concat(containers: Iterable[static_frame.core.bus.Bus], *, 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>) static_frame.core.bus.Bus [source]
Concatenate multiple
Bus
into a newBus
. AllBus
will load allFrame
into memory if any are deferred.
- classmethod Bus.from_dict(mapping: Dict[Hashable, static_frame.core.frame.Frame], *, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Bus construction from a mapping of labels and
Frame
.- Parameters
mapping – a dictionary or similar mapping interface.
- Returns
- classmethod Bus.from_frames(frames: Iterable[static_frame.core.frame.Frame], *, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None, name: Optional[Hashable] = None) static_frame.core.bus.Bus [source]
Return a
Bus
from an iterable ofFrame
; labels will be drawn fromFrame.name
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to a HDF5
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_items(pairs: Iterable[Tuple[Hashable, static_frame.core.frame.Frame]], *, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Return a
Bus
from an iterable of pairs of label,Frame
.- Returns
- classmethod Bus.from_series(series: static_frame.core.series.Series, *, store: Optional[static_frame.core.store.Store] = None, config: Union[static_frame.core.store.StoreConfig, Mapping[Any, static_frame.core.store.StoreConfig], None, static_frame.core.store.StoreConfigMap] = None, max_persist: Optional[int] = None, own_data: bool = False) static_frame.core.bus.Bus [source]
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to an SQLite
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to an XLSX
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to zipped CSV
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_zip_npz(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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to zipped parquet
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to zipped parquet
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to zipped pickle
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
- classmethod Bus.from_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, max_persist: Optional[int] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Given a file path to zipped TSV
Bus
store, return aBus
instance.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
max_persist – When loading
Frame
from aStore
, optionally define the maximum number ofFrame
to remain in theBus
, regardless of the size of theBus
. If more thanmax_persist
number ofFrame
are loaded, least-recently loadedFrame
will be replaced byFrameDeferred
. Amax_persist
of 1, for example, permits reading oneFrame
at a time without ever holding in memory more than 1Frame
.
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Exporter¶
Overview: Bus: Exporter
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.to_series() static_frame.core.series.Series [source]
Return a
Series
with theFrame
contained in thisBus
. If theBus
is associated with aStore
, allFrame
will be loaded into memory and the returnedBus
will no longer be associated with theStore
.
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.to_visidata() None
Open an interactive VisiData session.
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.to_zip_npz(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 NPZ files.- Parameters
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
- Bus.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
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Attribute¶
Overview: Bus: Attribute
- Bus.STATIC: bool = False
- Bus.dtype
Return the dtype of the underlying NumPy array.
- Returns
numpy.dtype
- Bus.dtypes
Returns a
Frame
of dtype per column for all loaded Frames.
- Bus.index
The index instance assigned to this container.
- Returns
- Bus.mloc
Returns a
Series
showing a tuple of memory locations within each loaded Frame.
- Bus.name
A hashable label attached to this container.
- Returns
Hashable
- Bus.nbytes
Total bytes of data currently loaded in the Bus.
- Bus.ndim
Return the number of dimensions, which for a
Bus
is always 1.- Returns
int
- Bus.shape
Return a tuple describing the shape of the underlying NumPy array.
- Returns
Tuple[int]
- Bus.shapes
A
Series
describing the shape of each loadedFrame
. UnloadedFrame
will have a shape of None.- Returns
- Bus.size
Return the size of the underlying NumPy array.
- Returns
int
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Method¶
Overview: Bus: Method
- Bus.__bool__() bool
Raises ValueError to prohibit ambiguous use of truethy evaluation.
- Bus.__len__() int [source]
Length of values.
- Bus.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.
- Bus.head(count: int = 5) static_frame.core.bus.Bus [source]
Return a
Bus
consisting only of the top elements as specified bycount
.
- Bus.rehierarch(depth_map: Sequence[int]) static_frame.core.bus.Bus [source]
Return a new
Bus
with new a hierarchy based on the supplieddepth_map
.
- Bus.reindex(index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], *, fill_value: Any, own_index: bool = False, check_equals: bool = True) static_frame.core.bus.Bus [source]
Return a new
Bus
with labels defined by the provided index. The size and ordering of the data is determined by the newly provided index, where data will continue to be aligned under labels found in both the new and the old index. Labels found only in the new index will be filled withfill_value
.- Parameters
index – An iterable of unique, hashable values, or another
Index
orIndexHierarchy
, to be used as the labels of the index.columns – An iterable of unique, hashable values, or another
Index
orIndexHierarchy
, to be used as the labels of the index.fill_value – A value to be used to fill space created by a new index that has values not found in the previous index.
own_index – Flag the passed index as ownable by this
static_frame.Bus
. Primarily used by internal clients.
- Bus.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]]]], *, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.bus.Bus [source]
Return a new
Bus
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 orSeries
), 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) TheIndexAutoFactory
type, to apply an auto-incremented integer index. (d) An index initializer, i.e., either an iterable of hashables or anIndex
instance.
- Bus.relabel_flat() static_frame.core.bus.Bus [source]
Return a new
Bus
, where anIndexHierarchy
(if defined) is replaced with a flat, one-dimension index of tuples.
- Bus.relabel_level_add(level: Hashable) static_frame.core.bus.Bus [source]
Return a new
Bus
, adding a new root level to an existingIndexHierarchy
, or creating anIndexHierarchy
if one is not yet defined.- Parameters
level – A hashable value to be used as a new root level, extending or creating an
IndexHierarchy
- Bus.relabel_level_drop(count: int = 1) static_frame.core.bus.Bus [source]
Return a new
Bus
, dropping one or more levels from a either the root or the leaves of anIndexHierarchy
. 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.
- Bus.rename(name: Optional[Hashable]) static_frame.core.bus.Bus [source]
Return a new
Bus
with an updated name attribute.
- Bus.roll(shift: int, *, include_index: bool = False) static_frame.core.bus.Bus [source]
Return a Bus with values rotated forward and wrapped around the index (with a positive shift) or backward and wrapped around the index (with a negative shift).
- Parameters
shift – Positive or negative integer shift.
include_index – Determine if the Index is shifted with the underlying data.
- Returns
- Bus.shift(shift: int, *, fill_value: Any) static_frame.core.bus.Bus [source]
Return a
Bus
with values shifted forward on the index (with a positive shift) or backward on the index (with a negative shift).- Parameters
shift – Positive or negative integer shift.
fill_value – Value to be used to fill data missing after the shift.
- Returns
- Bus.sort_index(*, ascending: Union[bool, Iterable[bool]] = True, kind: str = 'mergesort', key: Optional[Callable[[static_frame.core.index_base.IndexBase], Union[numpy.ndarray, static_frame.core.index_base.IndexBase]]] = None) static_frame.core.bus.Bus [source]
Return a new Bus ordered by the sorted Index.
- 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 isTrue
.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.
- Returns
- Bus.sort_values(*, ascending: bool = True, kind: str = 'mergesort', key: Callable[[static_frame.core.series.Series], Union[numpy.ndarray, static_frame.core.series.Series]]) static_frame.core.bus.Bus [source]
Return a new Bus ordered by the sorted values. Note that as a Bus contains Frames, a key argument must be provided to extract a sortable value, and this key function will process a
Series
ofFrame
.- Parameters
* –
ascending – If True, sort in ascending order; if False, sort in descending order.
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.
- Returns
- Bus.tail(count: int = 5) static_frame.core.bus.Bus [source]
- Return a
Bus
consisting only of the bottom elements as specified bycount
. s
- Return a
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Dictionary-Like¶
Overview: Bus: Dictionary-Like
- Bus.__contains__(value: Hashable) bool [source]
Inclusion of value in index labels.
- Returns
bool
- Bus.__iter__() Iterator[Hashable] [source]
Iterator of index labels, same as
static_frame.Series.keys
.- Returns
Iterator[Hashasble]
- Bus.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
- Bus.items() Iterator[Tuple[Hashable, static_frame.core.frame.Frame]] [source]
- Bus.keys() static_frame.core.index_base.IndexBase [source]
Iterator of index labels.
- Returns
Iterator[Hashable]
- Bus.values
A 1D object array of all
Frame
contained in theBus
. The returnednp.ndarray
will haveFrame
; this will never return an array withFrameDeferred
, butmax_persist
will be observed in reading from the Store.
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Display¶
Overview: Bus: Display
- Bus.interface¶
A Frame documenting the interface of this class.
>>> sf.Bus.interface.loc[sf.Bus.interface['group'] == 'Exporter'] <Frame: Bus> <Index> cls_name group doc <<U18> <Index: signature> to_hdf5(fp, *, config) Bus Exporter Write the complet... to_series() Bus Exporter Return a Series w... to_sqlite(fp, *, config) Bus Exporter Write the complet... to_visidata() Bus Exporter Open an interacti... to_xlsx(fp, *, config) Bus Exporter Write the complet... to_zip_csv(fp, *, config) Bus Exporter Write the complet... to_zip_npz(fp, *, config) Bus Exporter Write the complet... to_zip_parquet(fp, *, config) Bus Exporter Write the complet... to_zip_pickle(fp, *, config) Bus Exporter Write the complet... to_zip_tsv(fp, *, config) Bus Exporter Write the complet... <<U65> <<U3> <<U15> <<U83>
- Bus.__repr__() str
Return repr(self).
- Bus.__str__()
Return str(self).
- Bus.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, thestatic_frame.DisplayActive
will be used.
- Bus.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, thestatic_frame.DisplayActive
will be used.
- Bus.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, thestatic_frame.DisplayActive
will be used.
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Selector¶
Overview: Bus: Selector
- Bus.drop[key]
- Bus.drop
Interface for dropping elements from
static_frame.Bus
.
- InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray]) Any [source]
Label-based selection.
- Bus.drop.iloc[key]
- Bus.drop
Interface for dropping elements from
static_frame.Bus
.
- InterfaceSelectTrio.iloc
Integer-position based selection.
- Bus.drop.loc[key]
- Bus.drop
Interface for dropping elements from
static_frame.Bus
.
- InterfaceSelectTrio.loc
Label-based selection.
- Bus[key]
- Bus.__getitem__ = <function Bus.__getitem__>[source]
- Bus.iloc[key]
- Bus.iloc
- Bus.loc[key]
- Bus.loc
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Iterator¶
Overview: Bus: Iterator
- Bus.iter_element
- iter_element
Iterator of elements.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.iter_element_items
- iter_element_items
Iterator of label, element pairs.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
- Bus.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) static_frame.core.node_iter.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.
- Bus.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.
- Bus.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.
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary
Bus: Operator Binary¶
Overview: Bus: Operator Binary
- Bus.__eq__(value, /)
Return self==value.
- Bus.__ge__(value, /)
Return self>=value.
- Bus.__gt__(value, /)
Return self>value.
- Bus.__le__(value, /)
Return self<=value.
- Bus.__lt__(value, /)
Return self<value.
- Bus.__ne__(value, /)
Return self!=value.
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary