Detail: Bus: Attribute#

Overview: Bus: Attribute

Bus.STATIC = False#
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.STATIC
False
Bus.dtype#

Return the dtype of the underlying NumPy array.

Returns:

numpy.dtype

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.dtype
object
Bus.dtypes#

Returns a Frame of dtype per column for all loaded Frames.

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.dtypes
<Frame>
<Index> a        b        c        d        <<U1>
<Index>
x       int64    int64    None     None
y       None     None     bool     bool
<<U1>   <object> <object> <object> <object>
Bus.index#

The index instance assigned to this container.

Returns:

Index

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.index
<Index>
x
y
<<U1>
Bus.inventory#

Return a Frame indicating file_path, last-modified time, and size of underlying disk-based data stores if used for this Bus.

>>> b1 = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b1.to_zip_npz("/tmp/b.zip")
>>> b2 = sf.Bus.from_zip_npz("/tmp/b.zip")
>>> b2.inventory
<Frame>
<Index>  path       last_modified        size   <<U13>
<Index>
None     /tmp/b.zip 2026-03-18T00:43:09… 1.0 KB
<object> <<U10>     <<U32>               <<U6>
Bus.memory#

A MemoryDisplay, providing the size in memory of this object. For compound containers, component sizes will also be provided. Size can be interpreted through six combinations of three configurations:

L: Local: memory ignoring referenced array data provided via views. LM: Local Materialized: memory where arrays that are locally owned report their byte payload LMD: Local Materialized Data: locally owned memory of arrays byte payloads, excluding all other components

R: Referenced: memory including referenced array data provided via views RM: Referenced Materialized: memory where arrays that are locally owned or referenced report their byte payload RMD: Referenced Materialized Data: localy owned and referenced array byte payloads, excluding all other components

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.memory
      L    Lu    LM   LMu   LMD LMDu  R     Ru    RM   RMu   RMD RMDu
Total 5.37 KB    1.27 KB    793 B     13.48 KB    1.29 KB    809 B
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

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.name
i
Bus.nbytes#

Total bytes of data currently loaded in the Bus.

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.nbytes
54
Bus.ndim#

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

Returns:

int

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.ndim
1
Bus.shape#

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

Returns:

Tuple[int]

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.shape
(2,)
Bus.shapes#

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

Returns:

Series

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.shapes
<Series: shape>
<Index>
x               (3, 2)
y               (3, 2)
<<U1>           <object>
Bus.size#

Return the size of the underlying NumPy array.

Returns:

int

>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b.size
2
Bus.status#

Return a Frame indicating loaded status, size, bytes, and shape of all loaded Frame.

>>> b1 = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i')
>>> b1.to_zip_npz("/tmp/b.zip")
>>> b2 = sf.Bus.from_zip_npz("/tmp/b.zip")
>>> b2.status
<Frame>
<Index> loaded size      nbytes    shape    <<U6>
<Index>
x       False  nan       nan       None
y       False  nan       nan       None
<<U1>   <bool> <float64> <float64> <object>

Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Accessor Hashlib | Accessor Type Clinic | Accessor Mapping