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 TensorIndex count(MessageMeta &self)

Get messages count.

Parameters

self

Returns

TensorIndex

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 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.

© Copyright 2023, NVIDIA. Last updated on Apr 11, 2023.