Documentation ¶
Index ¶
- func Import(name, path string, opt ...Option) (*datatable.DataTable, error)
- type Option
- func AcceptDate(v string) Option
- func ColumnNames(v ...string) Option
- func ColumnTypes(v ...datatable.ColumnType) Option
- func Comma(v rune) Option
- func Comment(v rune) Option
- func HasHeader(v bool) Option
- func IgnoreLineWithError(v bool) Option
- func LazyQuotes(v bool) Option
- func TrimLeadingSpace(v bool) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
Option is a setter
func ColumnTypes ¶
func ColumnTypes(v ...datatable.ColumnType) Option
ColumnTypes defines the column type
func Comment ¶
Comment if not 0, is the comment character. Lines beginning with the Comment character without preceding whitespace are ignored.
func IgnoreLineWithError ¶
IgnoreLineWithError to not stop the reading process if a line has an error
func LazyQuotes ¶
LazyQuotes is true, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field.
func TrimLeadingSpace ¶
TrimLeadingSpace is true, leading white space in a field is ignored. This is done even if the field delimiter, Comma, is white space.
type Options ¶
type Options struct { HasHeaders bool ColumnNames []string // if len == 0 => take headers else "col #i" ColumnTypes []datatable.ColumnType // if len == 0 => detection IgnoreIfReadLineError bool Comma rune Comment rune LazyQuotes bool TrimLeadingSpace bool DateFormats []string }
Options are options to import a csv
Click to show internal directories.
Click to hide internal directories.