Documentation ¶
Index ¶
- type Reader
- func (reader *Reader) Col(colName interface{}) (data []string, err error)
- func (reader *Reader) Cols(colNames ...interface{}) (data [][]string, err error)
- func (reader *Reader) Data() [][]string
- func (reader *Reader) Read(fileName string, sep rune, skip bool, columns []string) error
- func (reader *Reader) Row(index int) []string
- func (reader *Reader) Rows(from, to int) [][]string
- func (reader *Reader) Slice(from, to int, colNames ...interface{}) (data [][]string, err error)
- type Writer
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 defines a reading structure for reading a CSV file.
func (*Reader) Cols ¶
Cols retrieves a multi-column data given either column indices or column names. It returns a 2d array even user only retrieves one column.
func (*Reader) Read ¶
Read reads a CSV file by specifying: - name: file name (full path) - sep: separator, e.g., ',', ';' - skip: if true first row will be skipped, otherwise not skipped - columns: column names, use can set column names and later use column name to retrieve column data.
Click to show internal directories.
Click to hide internal directories.