Signature Description Parameters
template<typename T, typename ... Ts>
void
sort(const char *name, sort_spec dir);
Sort the DataFrame by the named column. If name equals "INDEX", it sorts by index. Otherwise it sorts by the named column. Sort first calls make_consistent() that may add nan values to data columns.
nan values make sorting nondeterministic.
T: Type of the by_name column. You always of the specify this type, even if it is being sorted to the default index
Ts: The list of types for all columns. A type should be specified only once.
name: The name of a column or string "INDEX".
dir: Direction of sorting, ascending or descending
template<typename T1, typename T2, typename ... Ts>
void
sort(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2);
This sort function sorts DataFrame based on two columns, also specified by the two directions. name[n] could be "INDEX" in whcih case the index column is taken as the sorting column.
NOTE: The order of T[n] type specifications must match the order of name[n] column names. In addition, all column types must be specified separately. Otherwise, the behavior is undefined.
NOTE: Sort first calls make_consistent() that may add nan values to data columns. nan values make sorting nondeterministic.
T1: Type of the first named column. You always must specify this type, even if it is being sorted by the index.
T2: Type of the second named column. You always must specify this type, even if it is being sorted by the index.
Ts: List all the types of all data columns. A type should be specified in the list only once.
name1: Name of the first column or string "INDEX"
name2: Name of the second column or string "INDEX"
dir1: Direction of sorting for the first column
dir2: Direction of sorting for the second column
template<typename T1, typename T2, typename T3, typename ... Ts>
void
sort(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3);
This sort function is similar to above, but it uses 3 columns
template<typename T1, typename T2, typename T3, typename T4, typename ... Ts>
void
sort(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3, const char *name4, sort_spec dir4);
This sort function is similar to above, but it uses 4 columns
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename ... Ts>
void
sort(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3, const char *name4, sort_spec dir4, const char *name5, sort_spec dir5);
This sort function is similar to above, but it uses 5 columns
Signature Description Parameters
template<typename T, typename ... Ts>
std::future<void>
sort_async(const char *name, sort_spec dir);
This is the asynchronous version that returns a std::future. Please see above for details
template<typename T1, typename T2, typename ... Ts>
std::future<void>
sort_async(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2);
This is the asynchronous version that returns a std::future. Please see above for details
template<typename T1, typename T2, typename T3, typename ... Ts>
std::future<void>
sort_async(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3);
This is the asynchronous version that returns a std::future. Please see above for details
template<typename T1, typename T2, typename T3, typename T4, typename ... Ts>
std::future<void>
sort_async(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3, const char *name4, sort_spec dir4);
This is the asynchronous version that returns a std::future. Please see above for details
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename ... Ts>
std::future<void>
sort_async(const char *name1, sort_spec dir1, const char *name2, sort_spec dir2, const char *name3, sort_spec dir3, const char *name4, sort_spec dir4, const char *name5, sort_spec dir5);
This is the asynchronous version that returns a std::future. Please see above for details