Class MessageMeta
Defined in File meta.hpp
Derived Type
public morpheus::SlicedMessageMeta
(Class SlicedMessageMeta)
-
class MessageMeta
Container for class holding a data table, in practice a cudf DataFrame, with the ability to return both Python and C++ representations of the table.
Subclassed by morpheus::SlicedMessageMeta
Public Functions
-
TensorIndex count() const
Get the py table object.
- Returns
pybind11::object
- virtual MutableTableInfo get_mutable_info() const
TODO(Documentation)
-
bool has_sliceable_index() const
Returns true if the underlying DataFrame’s index is unique and monotonic. Sliceable indices have better performance since a range of rows can be specified by a start and stop index instead of requiring boolean masks.
- Returns
bool
-
virtual std::optional<std::string> ensure_sliceable_index()
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}
. Ifhas_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.
Public Static Functions
-
static std::shared_ptr<MessageMeta> create_from_python(pybind11::object &&data_table)
Create MessageMeta cpp object from a python object.
- Parameters
- Returns
data_table –
std::shared_ptr<MessageMeta>
-
static std::shared_ptr<MessageMeta> create_from_cpp(cudf::io::table_with_metadata &&data_table, int index_col_count = 0)
Create MessageMeta cpp object from a cpp object, used internally by
create_from_cpp
- Parameters
data_table –
index_col_count –
- Returns
std::shared_ptr<MessageMeta>
Protected Functions
Protected Attributes
- std::shared_ptr<IDataTable> m_data
Protected Static Functions
-
static pybind11::object cpp_to_py(cudf::io::table_with_metadata &&table, int index_col_count = 0)
Create MessageMeta python object from a cpp object.
- Parameters
table –
index_col_count –
- Returns
pybind11::object
-
TensorIndex count() const