Signature Description Parameters

template<typename T>
[[nodiscard]] ColumnVecType<T> &
get_column (const char *name);
        
It returns a reference to the container of named data column. The return type depends on if we are in standard or view mode T: Type of the named data column
name: Name of the column

template<typename T>
[[nodiscard]] const ColumnVecType<T> &
get_column (const char *name) const;
        
It returns a const reference to the container of named data column. The return type depends on if we are in standard or view mode T: Type of the named data column
name: Name of the column

template<typename T>
[[nodiscard]] ColumnVecType<T> &
get_column (std::size_t index);
        
It returns a reference to the container of the column. The return type depends on if we are in standard or view mode T: Type of the named data column
index: Index of the column

template<typename T>
[[nodiscard]] const ColumnVecType<T> &
get_column (std::size_t index) const;
        
It returns a const reference to the container of the column. The return type depends on if we are in standard or view mode T: Type of the named data column
index: Index of the column
    df.get_column<double>("dbl_col")[5] = 6.5;
    df.get_column<double>("dbl_col")[6] = 7.5;
    df.get_column<double>("dbl_col")[7] = 8.5;
    assert(::abs(df.visit<double>("dbl_col", dvisitor).get_result() - 4.83406) < 0.0001);

    std::vector<double> dvec = df.get_column<double> ("dbl_col");
    std::vector<double> dvec2 = df.get_column<double> ("dbl_col_2");

    assert(dvec.size() == 9);
    assert(dvec[0] == 1.2345);
    assert(dvec[1] == 2.2345);
    assert(dvec[3] == 4.2345);
    assert(dvec[8] == 10.56);

    assert(dvec2.size() == 8);
    assert(dvec2[0] == 0.998);
    assert(dvec2[1] == 0.3456);
    assert(dvec2[4] == 0.00345);
    assert(dvec2[7] == 0.1);
C++ DataFrame