Class SlicedMessageMeta

(Latest Version)
class SlicedMessageMeta : public morpheus::MessageMeta

Operates similarly to MessageMeta, except it applies a filter on the columns and rows. Used by Serialization to filter columns without copying the entire DataFrame.

Public Functions

SlicedMessageMeta(std::shared_ptr<MessageMeta> other, TensorIndex start = 0, TensorIndex stop = -1, std::vector<std::string> columns = {})

virtual TensorIndex count() const override

Get the row count of the underlying DataFrame.

Returns

TensorIndex

virtual TableInfo get_info() const override

Get the info object.

Returns

TableInfo

virtual TableInfo get_info(const std::string &col_name) const override

Get the info object for a specific column.

Parameters

col_name – The name of the column to slice

Returns

TableInfo The table info containing only the column specified

virtual TableInfo get_info(const std::vector<std::string> &column_names) const override

Get the info object for a specific set of columns.

Parameters

column_names – The names of the columns to slice

Returns

TableInfo The table info containing only the columns specified, in the order specified

virtual MutableTableInfo get_mutable_info() const override

TODO(Documentation)

virtual std::optional<std::string> ensure_sliceable_index() override

Replaces the index in the underlying dataframe if the existing one is not unique and monotonic. The old index will be preserved in a column named _index_{old_index.name}. If has_sliceable_index() == true, this is a no-op.

Returns

std::string The name of the column with the old index or nullopt if no changes were made.

Previous Template Class SerializeStage
Next Class SourceStageStopAfter
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.