csv

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads CSV data into columnar RecordBatches.

func NewReader

func NewReader(data []byte, cfg ReaderConfig) (*Reader, error)

NewReader creates a CSV reader from raw bytes with the given config.

func NewStreamReader

func NewStreamReader(r io.Reader, cfg ReaderConfig) (*Reader, error)

NewStreamReader creates a streaming CSV reader from an io.Reader. Reads the header and a sample of rows for schema inference, then streams remaining rows on demand via Next(). Memory usage is O(batch_size) instead of O(total_rows).

func (*Reader) Next

func (r *Reader) Next() (*batch.RecordBatch, error)

Next returns the next batch of rows as a RecordBatch.

func (*Reader) Schema

func (r *Reader) Schema() []parquet.Column

Schema returns the inferred schema.

type ReaderConfig

type ReaderConfig struct {
	Delimiter rune // field delimiter (default: ',')
	HasHeader bool // whether the first row is a header (default: true)
}

ReaderConfig controls CSV parsing behavior.

func DefaultConfig

func DefaultConfig() ReaderConfig

DefaultConfig returns sensible defaults for CSV reading.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL