xcsv: read/write CSV files

Defined in xtensor/io/xcsv.hpp

template<class T, class A = std::allocator<T>>
xcsv_tensor<T, A> xt::load_csv(std::istream &stream, const char delimiter, const std::size_t skip_rows, const std::ptrdiff_t max_rows, const std::string comments)

Load tensor from CSV.

Returns an xexpression for the parsed CSV

Parameters:
  • stream – the input stream containing the CSV encoded values

  • delimiter – the character used to separate values. [default: ‘,’]

  • skip_rows – the number of lines to skip from the beginning. [default: 0]

  • max_rows – the number of lines to read after skip_rows lines; the default is to read all the lines. [default: -1]

  • comments – the string used to indicate the start of a comment. [default: “#”]

Warning

doxygenfunction: Unable to resolve function “xt::dump_csv” with arguments None in doxygen xml output for project “xtensor” from directory: ../xml. Potential matches:

- template<class E> void dump_csv(std::ostream &stream, const xexpression<E> &e)
- template<class E> void dump_csv(std::ostream &stream, const xexpression<E> &e, const xcsv_config &config)