用于 read_csv()
的设置。 更多...
#include <csv.hpp>
公共成员函数 | |
csv_reader_options ()=default | |
默认构造函数。 更多... | |
source_info const & | get_source () const |
返回源信息。 更多... | |
compression_type | get_compression () const |
返回源的压缩格式。 更多... | |
std::size_t | get_byte_range_offset () const |
返回从源开始跳过的字节数。 更多... | |
std::size_t | get_byte_range_size () const |
返回要读取的字节数。 更多... | |
std::size_t | get_byte_range_size_with_padding () const |
返回带填充的要读取的字节数。 更多... | |
std::size_t | get_byte_range_padding () const |
返回读取时要填充的字节数。 更多... | |
std::vector< std::string > const & | get_names () const |
返回列名。 更多... | |
std::string | get_prefix () const |
返回用于列 ID 的前缀。 更多... | |
bool | is_enabled_mangle_dupe_cols () const |
是否重命名重复的列名。 更多... | |
std::vector< std::string > const & | get_use_cols_names () const |
返回要读取的列名。 更多... | |
std::vector< int > const & | get_use_cols_indexes () const |
返回要读取的列索引。 更多... | |
size_type | get_nrows () const |
返回要读取的行数。 更多... | |
size_type | get_skiprows () const |
返回从头跳过的行数。 更多... | |
size_type | get_skipfooter () const |
返回从尾跳过的行数。 更多... | |
size_type | get_header () const |
返回标题行索引。 更多... | |
char | get_lineterminator () const |
返回行终止符。 更多... | |
char | get_delimiter () const |
返回字段分隔符。 更多... | |
char | get_thousands () const |
返回数字数据千位分隔符。 更多... | |
char | get_decimal () const |
返回小数点字符。 更多... | |
char | get_comment () const |
返回注释行起始字符。 更多... | |
bool | is_enabled_windowslinetermination () const |
是否将 \r\n 视为行终止符。 更多... | |
bool | is_enabled_delim_whitespace () const |
是否将空白字符视为字段分隔符。 更多... | |
bool | is_enabled_skipinitialspace () const |
是否跳过分隔符后的空白字符。 更多... | |
bool | is_enabled_skip_blank_lines () const |
是否忽略空行或将行值解析为无效。 更多... | |
quote_style | get_quoting () const |
返回引用样式。 更多... | |
char | get_quotechar () const |
返回引用字符。 更多... | |
bool | is_enabled_doublequote () const |
值内部的引用是否被双重引用。 更多... | |
bool | is_enabled_detect_whitespace_around_quotes () const |
是否检测被空格包围的引用,例如 "data" 。当 _doublequote 为 true 时,此标志无效。 更多... | |
std::vector< std::string > const & | get_parse_dates_names () const |
返回要作为 datetime 读取的列名。 更多... | |
std::vector< int > const & | get_parse_dates_indexes () const |
返回要作为 datetime 读取的列索引。 更多... | |
std::vector< std::string > const & | get_parse_hex_names () const |
返回要作为十六进制读取的列名。 更多... | |
std::vector< int > const & | get_parse_hex_indexes () const |
返回要作为十六进制读取的列索引。 更多... | |
std::variant< std::vector< data_type >, std::map< std::string, data_type > > const & | get_dtypes () const |
返回每列的数据类型。 更多... | |
std::vector< std::string > const & | get_true_values () const |
返回要识别为布尔真值的附加值。 更多... | |
std::vector< std::string > const & | get_false_values () const |
返回要识别为布尔假值的附加值。 更多... | |
std::vector< std::string > const & | get_na_values () const |
返回要识别为空值的附加值。 更多... | |
bool | is_enabled_keep_default_na () const |
是否保留内置的默认 NA 值。 更多... | |
bool | is_enabled_na_filter () const |
是否禁用空值过滤。 更多... | |
bool | is_enabled_dayfirst () const |
是否将日期解析为 DD/MM 而非 MM/DD。 更多... | |
data_type | get_timestamp_type () const |
返回 timestamp_type,所有时间戳列都将转换为此类型。 更多... | |
void | set_compression (compression_type comp) |
设置源的压缩格式。 更多... | |
void | set_byte_range_offset (std::size_t offset) |
设置从源开始跳过的字节数。 更多... | |
void | set_byte_range_size (std::size_t size) |
设置要读取的字节数。 更多... | |
void | set_names (std::vector< std::string > col_names) |
设置列名。 更多... | |
void | set_prefix (std::string pfx) |
设置用于列 ID 的前缀。 更多... | |
void | enable_mangle_dupe_cols (bool val) |
设置是否重命名重复的列名。 更多... | |
void | set_use_cols_names (std::vector< std::string > col_names) |
设置要读取的列名。 更多... | |
void | set_use_cols_indexes (std::vector< int > col_indices) |
设置要读取的列索引。 更多... | |
void | size_type |
set_nrows (size_type nrows) | |
void | 设置要读取的行数。 更多... |
set_skiprows (size_type skiprows) | |
void | 设置从头跳过的行数。 更多... |
set_skipfooter (size_type skipfooter) | |
void | 设置从尾跳过的行数。 更多... |
set_header (size_type hdr) | |
void | 设置标题行索引。 更多... |
set_lineterminator (char term) | |
void | 设置行终止符。 更多... |
set_delimiter (char delim) | |
void | 设置字段分隔符。 更多... |
set_thousands (char val) | |
void | 设置数字数据千位分隔符。 更多... |
set_decimal (char val) | |
void | 设置小数点字符。 更多... |
set_comment (char val) | |
void | 设置注释行起始字符。 更多... |
enable_windowslinetermination (bool val) | |
void | 设置是否将 \r\n 视为行终止符。 更多... |
enable_delim_whitespace (bool val) | |
void | 设置是否将空白字符视为字段分隔符。 更多... |
enable_skipinitialspace (bool val) | |
void | 设置是否跳过分隔符后的空白字符。 更多... |
enable_skip_blank_lines (bool val) | |
void | 设置是否忽略空行或将行值解析为无效。 更多... |
set_quoting (quote_style quoting) | |
void | 设置输入 CSV 数据中使用的预期引用样式。 更多... |
set_quotechar (char ch) | |
void | 设置引用字符。 更多... |
enable_doublequote (bool val) | |
void | 设置值内部的引用是否被双重引用。 更多... |
enable_detect_whitespace_around_quotes (bool val) | |
void | 设置是否检测被空格包围的引用,例如 "data" 。当 _doublequote 为 true 时,此标志无效。 更多... |
set_parse_dates (std::vector< std::string > col_names) | |
void | 设置要作为 datetime 读取的列名。 更多... |
set_parse_dates (std::vector< int > col_indices) | |
void | 设置要作为 datetime 读取的列索引。 更多... |
set_parse_hex (std::vector< std::string > col_names) | |
void | 设置要作为十六进制解析的列名。 更多... |
set_parse_hex (std::vector< int > col_indices) | |
void | 设置要作为十六进制解析的列索引。 更多... |
set_dtypes (std::map< std::string, data_type > types) | |
void | 设置每列的数据类型。 更多... |
set_dtypes (std::vector< data_type > types) | |
void | 设置每列的数据类型。 更多... |
set_true_values (std::vector< std::string > vals) | |
void | 设置要识别为布尔真值的附加值。 更多... |
set_false_values (std::vector< std::string > vals) | |
void | 设置要识别为布尔假值的附加值。 更多... |
set_na_values (std::vector< std::string > vals) | |
void | 设置要识别为空值的附加值。 更多... |
enable_keep_default_na (bool val) | |
void | 设置是否保留内置的默认 NA 值。 更多... |
enable_na_filter (bool val) | |
void | 设置是否禁用空值过滤。 更多... |
enable_dayfirst (bool val) | |
void | 设置是否将日期解析为 DD/MM 而非 MM/DD。 更多... |
set_timestamp_type (data_type type) | |
设置 timestamp_type,所有时间戳列都将转换为此类型。 更多... | |
静态公共成员函数 | static csv_reader_options_builder |
builder (source_info src) | |
csv_reader_options_builder
,用于构建 csv_reader_options
。 更多...详细描述
用于 read_csv()
的设置。
|
cudf::io::csv_reader_options::csv_reader_options |
默认
默认构造函数。
|
src |
|
val |
inline
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
布尔值,用于启用/禁用
|
val |
void cudf::io::csv_reader_options::enable_delim_whitespace
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否将空白字符视为字段分隔符。
|
val |
void cudf::io::csv_reader_options::enable_detect_whitespace_around_quotes
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否检测被空格包围的引用,例如 "data"
。当 _doublequote 为 true 时,此标志无效。
|
val |
void cudf::io::csv_reader_options::enable_doublequote
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置值内部的引用是否被双重引用。
|
val |
void cudf::io::csv_reader_options::enable_keep_default_na
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否保留内置的默认 NA 值。
|
val |
void cudf::io::csv_reader_options::enable_mangle_dupe_cols
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否重命名重复的列名。
|
val |
void cudf::io::csv_reader_options::enable_na_filter
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否禁用空值过滤。
|
val |
void cudf::io::csv_reader_options::enable_skip_blank_lines
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否忽略空行或将行值解析为无效。
|
val |
void cudf::io::csv_reader_options::enable_skipinitialspace
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否跳过分隔符后的空白字符。
|
val |
void cudf::io::csv_reader_options::enable_windowslinetermination
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置是否将日期解析为 DD/MM 而非 MM/DD。 |
设置是否将 \r\n
视为行终止符。
|
val |
const
从源开始跳过的字节数
|
val |
std::size_t cudf::io::csv_reader_options::get_byte_range_padding
读取时要填充的字节数
|
val |
std::size_t cudf::io::csv_reader_options::get_byte_range_size
要读取的字节数
|
val |
std::size_t cudf::io::csv_reader_options::get_byte_range_size_with_padding
带填充的要读取的字节数
|
val |
char cudf::io::csv_reader_options::get_comment
注释行起始字符
|
val |
|
val |
char cudf::io::csv_reader_options::get_decimal
小数点字符
|
val |
char cudf::io::csv_reader_options::get_delimiter
字段分隔符
|
val |
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_false_values
要识别为布尔假值的附加值
|
val |
|
val |
char cudf::io::csv_reader_options::get_lineterminator
行终止符
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_na_values
要识别为空值的附加值
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_names
列名
|
val |
|
val |
std::vector<int> const& cudf::io::csv_reader_options::get_parse_dates_indexes
要作为 datetime 读取的列索引
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_parse_dates_names
要作为 datetime 读取的列名
|
val |
std::vector<int> const& cudf::io::csv_reader_options::get_parse_hex_indexes
要作为十六进制读取的列索引
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_parse_hex_names
要作为十六进制读取的列名
|
val |
std::string cudf::io::csv_reader_options::get_prefix
用于列 ID 的前缀
|
val |
char cudf::io::csv_reader_options::get_quotechar
引用字符
|
val |
|
val |
|
val |
|
val |
|
val |
char cudf::io::csv_reader_options::get_thousands
数字数据千位分隔符
|
val |
data_type cudf::io::csv_reader_options::get_timestamp_type
timestamp_type,所有时间戳列都将转换为此类型
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_true_values
要识别为布尔真值的附加值
|
val |
std::vector<int> const& cudf::io::csv_reader_options::get_use_cols_indexes
要读取的列索引
|
val |
std::vector<std::string> const& cudf::io::csv_reader_options::get_use_cols_names
要读取的列名
|
val |
bool cudf::io::csv_reader_options::is_enabled_dayfirst
如果将日期解析为 DD/MM 则为 true,否则为 false (MM/DD)
|
val |
bool cudf::io::csv_reader_options::is_enabled_delim_whitespace
如果将空白字符视为字段分隔符则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_detect_whitespace_around_quotes
"data"
。当 _doublequote 为 true 时,此标志无效。如果 detect_whitespace_around_quotes 已启用则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_doublequote
如果值内部的引用被双重引用则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_keep_default_na
如果保留内置的默认 NA 值则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_mangle_dupe_cols
如果重命名重复的列名则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_na_filter
如果启用空值过滤则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_skip_blank_lines
如果忽略空行或将行值解析为无效则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_skipinitialspace
如果跳过分隔符后的空白字符则为 true
|
val |
bool cudf::io::csv_reader_options::is_enabled_windowslinetermination
\r\n
视为行终止符。如果将 \r\n
视为行终止符则为 true
|
val |
offset
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_byte_range_offset | 设置从源开始跳过的字节数。 |
偏移的字节数
|
val |
size
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_byte_range_size | 返回要读取的字节数。 |
设置要读取的字节数。
|
val |
void cudf::io::csv_reader_options::set_comment
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置注释行起始字符。 |
表示注释的字符
|
val |
comp
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_compression | 设置源的压缩格式。 |
压缩类型
|
val |
void cudf::io::csv_reader_options::set_decimal
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置小数点字符。 |
表示小数的字符
|
val |
delim
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_delimiter | 设置字段分隔符。 |
表示分隔符的字符
|
val |
types
csv_reader_options_builder
,用于构建 csv_reader_options
。std::map< std::string, data_type > | 设置每列的数据类型。 |
列名 -> 数据类型映射,指定列的目标数据类型
types
csv_reader_options_builder
,用于构建 csv_reader_options
。std::map< std::string, data_type > | std::vector< data_type > |
表示列目标数据类型的向量
|
val |
vals
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< std::string > | 设置要识别为布尔假值的附加值。 |
要被视为 false
的值向量
hdr
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_header | 设置标题行索引。 |
标题行所在的索引
|
val |
term
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_lineterminator | 设置行终止符。 |
表示行终止的字符
|
val |
void cudf::io::csv_reader_options::set_na_values
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< std::string > | 设置要识别为空值的附加值。 |
要被视为 null 的值向量
|
val |
col_names
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_names | 设置列名。 |
列名的向量
nrows
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_nrows | 返回要读取的行数。 |
设置要读取的行数。
|
val |
col_indices
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< int > | 设置要作为 datetime 读取的列索引。 |
要推断为 datetime 的列索引向量
|
val |
◆ set_parse_dates() [2/2]
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_names | 设置要作为 datetime 读取的列名。 |
要推断为 datetime 的列名向量
|
val |
void cudf::io::csv_reader_options::set_parse_hex
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< int > | 设置要作为十六进制解析的列索引。 |
要解析为十六进制的列索引向量
|
val |
◆ set_parse_hex() [2/2]
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_names | 设置要作为十六进制解析的列名。 |
要解析为十六进制的列名向量
|
val |
pfx
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_prefix | 设置用于列 ID 的前缀。 |
用于每个列名的前缀字符串
|
val |
ch
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_quotechar | 设置引用字符。 |
表示引用的字符
|
val |
quoting
设置输入 CSV 数据中使用的预期引用样式。
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_quoting | NONE:不对任何列进行引用。 |
使用的引用样式
skipfooter
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_skipfooter | 设置从尾跳过的行数。 |
要跳过的行数
skiprows
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_skiprows | 设置从尾跳过的行数。 |
设置从头跳过的行数。
|
val |
void cudf::io::csv_reader_options::set_thousands
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::enable_dayfirst | 设置数字数据千位分隔符。 |
分隔千位的字符
type
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_timestamp_type | 设置 timestamp_type,所有时间戳列都将转换为此类型。 |
所有时间戳列将转换为的目标 Dtype
|
val |
void cudf::io::csv_reader_options::set_true_values
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< std::string > | 设置要识别为布尔真值的附加值。 |
要被视为 true
的值向量
|
val |
void cudf::io::csv_reader_options::set_use_cols_indexes
csv_reader_options_builder
,用于构建 csv_reader_options
。std::vector< int > | 设置要读取的列索引。 |
所需的列索引向量
|
val |
void cudf::io::csv_reader_options::set_use_cols_names
csv_reader_options_builder
,用于构建 csv_reader_options
。void cudf::io::csv_reader_options::set_names | 设置要读取的列名。 |
所需的列名向量