meerkat.block package#
Submodules#
meerkat.block.abstract module#
- class AbstractBlock(*args, **kwargs)[source]#
Bases:
object
- classmethod consolidate(block_refs: Sequence[BlockRef]) Tuple[AbstractBlock, Mapping[str, BlockIndex]] [source]#
- classmethod from_block_data(data: object) Tuple[AbstractBlock, BlockView] [source]#
- classmethod from_column_data(data: object) Tuple[AbstractBlock, BlockView] [source]#
- property is_mmap#
- property signature: Hashable#
meerkat.block.arrow_block module#
- class ArrowBlock(data: Table, *args, **kwargs)[source]#
Bases:
AbstractBlock
- property signature: Hashable#
meerkat.block.manager module#
- class BlockManager[source]#
Bases:
MutableMapping
Manages all blocks in a DataPanel.
- add_column(col: AbstractColumn, name: str)[source]#
Convert data to a meerkat column using the appropriate Column type.
- apply(method_name: str = '_get', *args, **kwargs) BlockManager [source]#
[summary]
- Parameters:
fn (str) – a function that is applied to a block and column_spec and returns a new block and column_spec.
- Returns:
[description]
- Return type:
[type]
- classmethod read(path: str, columns: Sequence[str] | None = None, *args, **kwargs) BlockManager [source]#
Load a DataPanel stored on disk.
- update(block_ref: BlockRef)[source]#
data (): a single blockable object, potentially contains multiple columns.
- property ncols#
- property nrows#
meerkat.block.numpy_block module#
- class NumpyBlock(data, *args, **kwargs)[source]#
Bases:
AbstractBlock
- class Signature(dtype: 'np.dtype', nrows: 'int', shape: 'Tuple[int]', klass: 'type', mmap: 'Union[bool, int]')[source]#
Bases:
object
- dtype: dtype#
- klass: type#
- mmap: bool | int#
- nrows: int#
- shape: Tuple[int]#
- classmethod from_column_data(data: ndarray) Tuple[NumpyBlock, BlockView] [source]#
[summary]
- Parameters:
data (np.ndarray) – [description]
names (Sequence[str]) – [description]
- Raises:
ValueError – [description]
- Returns:
[description]
- Return type:
Tuple[NumpyBlock, Mapping[str, BlockIndex]]
- property is_mmap#
- property signature: Hashable#
meerkat.block.pandas_block module#
- class PandasBlock(data: DataFrame, *args, **kwargs)[source]#
Bases:
AbstractBlock
- classmethod from_column_data(data: Series) Tuple[PandasBlock, BlockView] [source]#
[summary]
- Parameters:
data (np.ndarray) – [description]
names (Sequence[str]) – [description]
- Raises:
ValueError – [description]
- Returns:
[description]
- Return type:
Tuple[PandasBlock, Mapping[str, BlockIndex]]
- property signature: Hashable#
meerkat.block.ref module#
- class BlockRef(columns: Mapping[str, AbstractColumn], block: AbstractBlock)[source]#
Bases:
Mapping
- property block_indices#
meerkat.block.tensor_block module#
- class TensorBlock(data, *args, **kwargs)[source]#
Bases:
AbstractBlock
- class Signature(device: 'torch.device', dtype: 'torch.dtype', nrows: 'int', shape: 'Tuple[int]', klass: 'type')[source]#
Bases:
object
- device: device#
- dtype: dtype#
- klass: type#
- nrows: int#
- shape: Tuple[int]#
- classmethod from_column_data(data: Tensor) Tuple[TensorBlock, BlockView] [source]#
[summary]
- Parameters:
data (np.ndarray) – [description]
names (Sequence[str]) – [description]
- Raises:
ValueError – [description]
- Returns:
[description]
- Return type:
Tuple[NumpyBlock, Mapping[str, BlockIndex]]
- property signature: Hashable#