morpheus.io.data_storage.in_memory.InMemoryStorage#
- class InMemoryStorage(file_format)[source]#
Bases:
RecordStorageInterfaceA class to manage storage of data in memory.
- Attributes:
backing_sourceGet the backing source.
num_rowsGet the number of rows in the data.
ownerGet whether this instance is the owner of the data in the buffer.
Methods
delete()Delete the data in the buffer if this instance is the owner.
load()Load data from the buffer.
store(data_source[, copy_from_source])Store data in the buffer.
- property owner: bool#
Get whether this instance is the owner of the data in the buffer.
- Returns:
True if this instance is the owner of the data in the buffer, False otherwise.
- store(data_source, copy_from_source=True)[source]#
Store data in the buffer.
- Args:
data_source: The data to store. Can be a pandas.DataFrame, cudf.DataFrame, or a file path. copy_from_source: If True, data_source is assumed to be a file path and the data will be copied from this file to the buffer. If False, the buffer will simply be updated to point to data_source (which is assumed to be a file path).