NVIDIA Morpheus (24.10.01)
(Latest Version)

Struct MessageMetaInterfaceProxy

struct MessageMetaInterfaceProxy

Interface proxy, used to insulate python bindings.

Public Static Functions

static std::shared_ptr<MessageMeta> init_cpp(const std::string &filename)

Initialize MessageMeta cpp object with the given filename.

Parameters

filename – : Filename for loading the data on to MessageMeta

Returns

std::shared_ptr<MessageMeta>

static std::shared_ptr<MessageMeta> init_python(pybind11::object &&data_frame)

Initialize MessageMeta cpp object with a given dataframe and returns shared pointer as the result.

Parameters

data_frame – : Dataframe that contains the data

Returns

std::shared_ptr<MessageMeta>

static std::shared_ptr<MessageMeta> init_python_meta(const pybind11::object &meta)

Initialize MessageMeta cpp object with a given a MessageMeta python objectand returns shared pointer as the result.

Parameters

meta – : Python MesageMeta object

Returns

std::shared_ptr<MessageMeta>

static TensorIndex count(MessageMeta &self)

Get messages count.

Parameters

self –

Returns

TensorIndex

static pybind11::object get_data(MessageMeta &self)

Gets a DataFrame for all columns.

Parameters

self – The MessageMeta instance

Returns

pybind11::object A python DataFrame containing the info for all columns

static pybind11::object get_data(MessageMeta &self, std::string col_name)

Get a Series for a single column.

Parameters
  • self – The MessageMeta instance

  • col_name – The name of the column to get

Returns

pybind11::object A python Series containing the info for the specified column

static pybind11::object get_data(MessageMeta &self, std::vector<std::string> columns)

Get a DataFrame for a set of columns.

Parameters
  • self – The MessageMeta instance

  • columns – The names of the columns to get

Returns

pybind11::object A python DataFrame containing the info for the specified columns, in the order specified

static pybind11::object get_data(MessageMeta &self, pybind11::none none_obj)

Gets a DataFrame for all columns. This is only used for overload resolution from python.

Parameters
  • self – The MessageMeta instance

  • none_obj – An object of None

Returns

pybind11::object A python DataFrame containing the info for all columns

static void set_data(MessageMeta &self, pybind11::object columns, pybind11::object value)

Set the values for one or more columns from a python object.

Parameters
  • self – The MessageMeta instance

  • columns – The names of the columns to set

  • value – The value to set the columns to. This can be a scalar, a list, a numpy array, a Series, or a DataFrame. The dimension must match the number of columns according to DataFrame broadcasting rules.

static std::vector<std::string> get_column_names(MessageMeta &self)
static pybind11::object get_data_frame(MessageMeta &self)

Get a copy of the data frame object as a python object.

Parameters

self – The MessageMeta instance

Returns

pybind11::object A DataFrame object

static pybind11::object df_property(MessageMeta &self)
static MutableTableCtxMgr mutable_dataframe(MessageMeta &self)
static bool has_sliceable_index(MessageMeta &self)

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

static std::optional<std::string> ensure_sliceable_index(MessageMeta &self)

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 <a class="reference internal" href="#structmorpheus_1_1MessageMetaInterfaceProxy_1ab94a547ce2b0b93c41cac39cf928d738" target="_self">has_sliceable_index()</a> == 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.

static std::shared_ptr<MessageMeta> copy_ranges(MessageMeta &self, const std::vector<RangeType> &ranges)

Creates a deep copy of DataFrame with the specified ranges.

Parameters

ranges – the tensor index ranges to copy

Returns

std::shared_ptr<MessageMeta> the deep copy of the specified ranges

static std::shared_ptr<MessageMeta> get_slice(MessageMeta &self, TensorIndex start, TensorIndex stop)

Get a slice of the underlying DataFrame by creating a deep copy.

Parameters
  • start – the tensor index of the start of the copy

  • stop – the tensor index of the end of the copy

Returns

std::shared_ptr<MessageMeta> the deep copy of the speicifed slice

Previous Struct MemoryDescriptor
Next Struct MutableTableInfo
© Copyright 2024, NVIDIA. Last updated on Dec 3, 2024.