csv

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Value

func Value(rs [][]string, i, j int) dt.Value

Value gets the value by index i and j.

Types

type Reader

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

Reader is the CSV reader.

func NewReader

func NewReader() *Reader

NewReader creates a new reader.

func (*Reader) Comma

func (a *Reader) Comma(o rune) *Reader

Comma is the comma option.

func (*Reader) Comment

func (a *Reader) Comment(o rune) *Reader

Comment is the comment option.

func (*Reader) Drop

func (a *Reader) Drop(o int) *Reader

Drop is the drop option.

func (*Reader) LazyQuotes

func (a *Reader) LazyQuotes(o bool) *Reader

LazyQuotes is the lazy quotes option.

func (*Reader) Read

func (a *Reader) Read(r io.Reader) (*dt.Frame, error)

Read reads a frame from the io.Reader.

func (*Reader) ReadCSV

func (a *Reader) ReadCSV(cr *csv.Reader) (*dt.Frame, error)

ReadCSV reads a frame from the csv.Reader.

func (*Reader) ReadFile

func (a *Reader) ReadFile(name string) (*dt.Frame, error)

ReadFile reads a frame from the file.

func (*Reader) ReadRecords

func (a *Reader) ReadRecords(rs [][]string) (*dt.Frame, error)

ReadRecords reads a frame from the records.

func (*Reader) Suffix

func (a *Reader) Suffix(o string) *Reader

Suffix is the suffix quotes option.

func (*Reader) Tail

func (a *Reader) Tail(o int) *Reader

Tail is the tail option.

func (*Reader) Transformer

func (a *Reader) Transformer(o transform.Transformer) *Reader

Transformer is the transformer quotes option.

func (*Reader) TrimLeadingSpace

func (a *Reader) TrimLeadingSpace(o bool) *Reader

TrimLeadingSpace is the trim leading space option.

type Writer

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

Writer is the CSV writer.

func NewWriter

func NewWriter() *Writer

NewWriter creates a new writer.

func (*Writer) Comma

func (a *Writer) Comma(o rune) *Writer

Comma is the comma option.

func (*Writer) Transformer

func (a *Writer) Transformer(o transform.Transformer) *Writer

Transformer is the transformer option.

func (*Writer) UseCRLF

func (a *Writer) UseCRLF(o bool) *Writer

UseCRLF is the use CRLF option.

func (*Writer) Write

func (a *Writer) Write(frame *dt.Frame, w io.Writer) error

WriteFile write the frame to the io.Writer.

func (*Writer) WriteFile

func (a *Writer) WriteFile(frame *dt.Frame, name string) error

WriteFile write the frame to the file.

Jump to

Keyboard shortcuts

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