Documentation
¶
Overview ¶
Package csv provides CSV reading and writing for the dataset package.
This is a pure API facade — it contains zero heavy imports. The actual CSV parsing/writing is delegated to the engine via the dataset.CSVReader and dataset.CSVWriter interfaces:
- Memory engine: uses go-simdcsv + schema inference (dataset/memory/csv.go)
- Arrow engine: uses arrow/csv for zero-copy ingest (dataset/arrow/csv.go)
Usage:
ds, err := csv.Read(ctx, file, eng, csv.WithHeader(true)) err = csv.Write(ctx, file, ds, eng)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedType = errors.New("csv: unsupported column type")
ErrUnsupportedType is returned for unsupported column types.
Functions ¶
Types ¶
type Option ¶
Option is a functional option for CSV read/write.
func WithChunk ¶
WithChunk sets the number of rows per batch during reading. 0 means engine default (arrow: 65536, memory: unlimited).
func WithHeader ¶
WithHeader enables CSV header parsing (first row = column names).
func WithNullValues ¶
WithNullValues sets strings to treat as null.
Click to show internal directories.
Click to hide internal directories.