Public Member Functions | Static Public Member Functions | List of all members
cudf::io::csv_writer_options Class Reference

Settings to use for write_csv(). More...

#include <csv.hpp>

Public Member Functions

 csv_writer_options ()=default
 Default constructor. More...
 
sink_info const & get_sink () const
 Returns sink used for writer output. More...
 
table_view const & get_table () const
 Returns table that would be written to output. More...
 
std::vector< std::string > const & get_names () const
 Returns names of the columns. More...
 
std::string get_na_rep () const
 Returns string to used for null entries. More...
 
bool is_enabled_include_header () const
 Whether to write headers to csv. More...
 
size_type get_rows_per_chunk () const
 Returns maximum number of rows to process for each file write. More...
 
std::string get_line_terminator () const
 Returns character used for separating lines. More...
 
char get_inter_column_delimiter () const
 Returns character used for separating column values. More...
 
std::string get_true_value () const
 Returns string used for values != 0 in INT8 types. More...
 
std::string get_false_value () const
 Returns string used for values == 0 in INT8 types. More...
 
quote_style get_quoting () const
 Returns the quote style for the writer. More...
 
void set_names (std::vector< std::string > names)
 Sets optional associated column names. More...
 
void set_na_rep (std::string val)
 Sets string to used for null entries. More...
 
void enable_include_header (bool val)
 Enables/Disables headers being written to csv. More...
 
void set_rows_per_chunk (size_type val)
 Sets maximum number of rows to process for each file write. More...
 
void set_line_terminator (std::string term)
 Sets character used for separating lines. More...
 
void set_inter_column_delimiter (char delim)
 Sets character used for separating column values. More...
 
void set_true_value (std::string val)
 Sets string used for values != 0 in INT8 types. More...
 
void set_false_value (std::string val)
 Sets string used for values == 0 in INT8 types. More...
 
void set_table (table_view const &table)
 (Re)sets the table being written. More...
 
void set_quoting (quote_style quoting)
 Sets the quote style for the writer. More...
 

Static Public Member Functions

static csv_writer_options_builder builder (sink_info const &sink, table_view const &table)
 Create builder to create csv_writer_options. More...
 

Detailed Description

Settings to use for write_csv().

Definition at line 1374 of file csv.hpp.

Constructor & Destructor Documentation

◆ csv_writer_options()

cudf::io::csv_writer_options::csv_writer_options ( )
explicitdefault

Default constructor.

This has been added since Cython requires a default constructor to create objects on stack.

Member Function Documentation

◆ builder()

static csv_writer_options_builder cudf::io::csv_writer_options::builder ( sink_info const &  sink,
table_view const &  table 
)
static

Create builder to create csv_writer_options.

Parameters
sinkThe sink used for writer output
tableTable to be written to output
Returns
Builder to build csv_writer_options

◆ enable_include_header()

void cudf::io::csv_writer_options::enable_include_header ( bool  val)
inline

Enables/Disables headers being written to csv.

Parameters
valBoolean value to enable/disable

Definition at line 1531 of file csv.hpp.

◆ get_false_value()

std::string cudf::io::csv_writer_options::get_false_value ( ) const
inline

Returns string used for values == 0 in INT8 types.

Returns
string used for values == 0 in INT8 types

Definition at line 1497 of file csv.hpp.

◆ get_inter_column_delimiter()

char cudf::io::csv_writer_options::get_inter_column_delimiter ( ) const
inline

Returns character used for separating column values.

Returns
Character used for separating column values.

Definition at line 1483 of file csv.hpp.

◆ get_line_terminator()

std::string cudf::io::csv_writer_options::get_line_terminator ( ) const
inline

Returns character used for separating lines.

Returns
Character used for separating lines

Definition at line 1476 of file csv.hpp.

◆ get_na_rep()

std::string cudf::io::csv_writer_options::get_na_rep ( ) const
inline

Returns string to used for null entries.

Returns
string to used for null entries

Definition at line 1455 of file csv.hpp.

◆ get_names()

std::vector<std::string> const& cudf::io::csv_writer_options::get_names ( ) const
inline

Returns names of the columns.

Returns
Names of the columns in the output file

Definition at line 1448 of file csv.hpp.

◆ get_quoting()

quote_style cudf::io::csv_writer_options::get_quoting ( ) const
inline

Returns the quote style for the writer.

Note: Only MINIMAL and NONE are supported.

  1. MINIMAL: String columns containing special characters like row-delimiters field-delimiter/quotes will be quoted.
  2. NONE: No quoting is done for any columns.
Returns
quote_style The quote style for the writer

Definition at line 1509 of file csv.hpp.

◆ get_rows_per_chunk()

size_type cudf::io::csv_writer_options::get_rows_per_chunk ( ) const
inline

Returns maximum number of rows to process for each file write.

Returns
Maximum number of rows to process for each file write

Definition at line 1469 of file csv.hpp.

◆ get_sink()

sink_info const& cudf::io::csv_writer_options::get_sink ( ) const
inline

Returns sink used for writer output.

Returns
sink used for writer output

Definition at line 1434 of file csv.hpp.

◆ get_table()

table_view const& cudf::io::csv_writer_options::get_table ( ) const
inline

Returns table that would be written to output.

Returns
Table that would be written to output

Definition at line 1441 of file csv.hpp.

◆ get_true_value()

std::string cudf::io::csv_writer_options::get_true_value ( ) const
inline

Returns string used for values != 0 in INT8 types.

Returns
string used for values != 0 in INT8 types

Definition at line 1490 of file csv.hpp.

◆ is_enabled_include_header()

bool cudf::io::csv_writer_options::is_enabled_include_header ( ) const
inline

Whether to write headers to csv.

Returns
true if writing headers to csv

Definition at line 1462 of file csv.hpp.

◆ set_false_value()

void cudf::io::csv_writer_options::set_false_value ( std::string  val)
inline

Sets string used for values == 0 in INT8 types.

Parameters
valString to represent values == 0 in INT8 types

Definition at line 1566 of file csv.hpp.

◆ set_inter_column_delimiter()

void cudf::io::csv_writer_options::set_inter_column_delimiter ( char  delim)
inline

Sets character used for separating column values.

Parameters
delimCharacter to delimit column values

Definition at line 1552 of file csv.hpp.

◆ set_line_terminator()

void cudf::io::csv_writer_options::set_line_terminator ( std::string  term)
inline

Sets character used for separating lines.

Parameters
termCharacter to represent line termination

Definition at line 1545 of file csv.hpp.

◆ set_na_rep()

void cudf::io::csv_writer_options::set_na_rep ( std::string  val)
inline

Sets string to used for null entries.

Parameters
valString to represent null value

Definition at line 1524 of file csv.hpp.

◆ set_names()

void cudf::io::csv_writer_options::set_names ( std::vector< std::string >  names)
inline

Sets optional associated column names.

Parameters
namesAssociated column names

Definition at line 1517 of file csv.hpp.

◆ set_quoting()

void cudf::io::csv_writer_options::set_quoting ( quote_style  quoting)
inline

Sets the quote style for the writer.

Note: Only the following quote styles are supported:

  1. MINIMAL: String columns containing special characters like row-delimiters/ field-delimiter/quotes will be quoted.
  2. NONE: No quoting is done for any columns.
Parameters
quotingThe new quote_style for the writer.

Definition at line 1585 of file csv.hpp.

◆ set_rows_per_chunk()

void cudf::io::csv_writer_options::set_rows_per_chunk ( size_type  val)
inline

Sets maximum number of rows to process for each file write.

Parameters
valNumber of rows per chunk

Definition at line 1538 of file csv.hpp.

◆ set_table()

void cudf::io::csv_writer_options::set_table ( table_view const &  table)
inline

(Re)sets the table being written.

Parameters
tableTable to be written

Definition at line 1573 of file csv.hpp.

◆ set_true_value()

void cudf::io::csv_writer_options::set_true_value ( std::string  val)
inline

Sets string used for values != 0 in INT8 types.

Parameters
valString to represent values != 0 in INT8 types

Definition at line 1559 of file csv.hpp.


The documentation for this class was generated from the following file: