↰ Return to documentation for file (morpheus/_lib/include/morpheus/objects/table_info.hpp
)
#pragma once
#include "morpheus/objects/data_table.hpp"
#include "morpheus/utilities/type_util_detail.hpp"
#include <cudf/column/column_view.hpp>// for column_view
#include <cudf/table/table_view.hpp>
#include <cudf/types.hpp>// for size_type
#include <pybind11/pytypes.h>// for object
#include <memory>
#include <string>
#include <vector>
namespace morpheus {
/****** Component public implementations *******************/
/****** TableInfo******************************************/
struct TableInfo
{
TableInfo() = default;
TableInfo(std::shared_ptr<const IDataTable> parent,
cudf::table_view view,
std::vector<std::string> index_names,
std::vector<std::string> column_names);
const pybind11::object &get_parent_table() const;
const cudf::table_view &get_view() const;
std::vector<std::string> get_index_names() const;
std::vector<std::string> get_column_names() const;
cudf::size_type num_indices() const;
cudf::size_type num_columns() const;
cudf::size_type num_rows() const;
pybind11::object __attribute__((visibility("default"))) as_py_object() const;
void insert_columns(const std::vector<std::string> &column_names, const std::vector<TypeId> &column_types);
void insert_missing_columns(const std::vector<std::string> &column_names, const std::vector<TypeId> &column_types);
const cudf::column_view &get_column(cudf::size_type idx) const;
TableInfo get_slice(cudf::size_type start, cudf::size_type stop, std::vector<std::string> column_names = {}) const;
private:
std::shared_ptr<const IDataTable> m_parent;
cudf::table_view m_table_view;
std::vector<std::string> m_column_names;
std::vector<std::string> m_index_names;
};
// end of group
} // namespace morpheus