xtensor
xtensor copied to clipboard
how to sum string type load from csv? and how to convert string column to timestamp?
my csv file column fields: date, username, vol, type
all fields are string fromat.
can't load as double, but when load as string,
I can't sum vol column, and can't select rows by date range.
how to convert string column to int or double?
and how to convert string column to timestamp?
PS: why I can't find any doc and issue about my question? why others didn't have this issue?
thanks!
I try to convert string to int by below code:
auto vol = xt::col(csvdata, 2);
auto vol_int = xt::cast
it can't work too!
any good man can help?
and now I find xt::cast need xt::xarray as param. but xt::col is xt::view.
then, how to convert xt::view to xt::xarray? or how to get c col from csv to xt::xarray?
it is a maze without exits for me .
thanks!