Signature | Description | Parameters |
template<typename ... Ts>
DataFrame
get_data_by_loc(Index2D<IndexType> range) const;
|
It returns a DataFrame (including the index and data columns) containing the data from location begin to location end.
This function supports Python-like negative indexing. That is why the range type is long.
|
Ts: The list of types for all columns. A type should be specified only once.
range: The begin and end iterators for data
|
template<typename ... Ts>
DataFrame
get_data_by_loc(const std::vector<long> &locations) const;
|
It returns a DataFrame (including the index and data columns) containing the data from locations, specified in locations vector. This function supports Python-like negative indexing. That is why the locations vector type is long.
NOTE: The negative indexing is relative to the "index" column, which may not be the size as all other column.
The returned DataFrame is in the same order as locations parameter
|
Ts: The list of types for all columns. A type should be specified only once.
locations: List of indices into the index column to copy data
|
template<typename ... Ts>
DataFrameView<I>
get_view_by_loc(Index2D<IndexType> range) const;
|
It behaves like get_data_by_loc(), but it returns a DataFrameView.
A view is a DataFrame that is a reference to the original DataFrame.
So if you modify anything in the view the original DataFrame will also be modified.
NOTE: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.
NOTE: Although this is a const method, it returns a view. So, the data could still be modified through the returned view
|
Ts: The list of types for all columns. A type should be specified only once.
range: The begin and end iterators for data
|
template<typename ... Ts>
DataFramePtrView<I>
get_view_by_loc(const std::vector<long> &locations) const;
|
It behaves like get_data_by_loc(locations), but it returns a DataFramePtrView.
A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.
NOTE: There are certain operations that you cannot do with a view. For example, you cannot add/delete columns, etc.
NOTE: Although this is a const method, it returns a view. So, the data could still be modified through the returned view
|
Ts: The list of types for all columns. A type should be specified only once.
locations: List of indices into the index column to copy data
|