Closed sierret closed 1 year ago
This probably should fail more gracefully. But you are specifying the types for sort
in a wrong way.
For sort
, first specify the type(s) of column(s) used for sorting then all the types of the DataFrame
So your sort line should be
df.sort<int, std::string, int>(col.c_str(),sort_spec::desce);
Oh I understand. It works now thanks.
I may need to open an new issue for this as well, but you might consider adding a absolute value sort, i.e, sort in asc or desc based on the absolute value of a column. It should be trivial to do this with already implemented sort functions by just performing an asc and desc sort on two dataframes and then joining them by row based on column absolute value.
I will put it on my todo list. But yes please open a new issue
I was testing some of the functions and getting used to the library. Everything else seems fine but when attempting to sort I get a segmentation fault error.