csvparser

package
v0.0.0-...-2ae79de Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvDataByColumn

func CsvDataByColumn(data [][]string) (map[string][]float64, error)

create mapping of CSV headers to all values in column data is rows of CSV data read from a file with headers

func ReadCSV

func ReadCSV(filepath string) ([][]string, error)

func WriteCSV

func WriteCSV(filepath string, data string) error

The proper way to handle this would be to use the csv library as in ReadCSV, but csv writer expects [][]string type which would mean refactoring things in a way that there is not time for. Best alternative was to write a formatted string

Types

type InvalidCsvPathError

type InvalidCsvPathError struct {
	Filepath string
}

func (*InvalidCsvPathError) Error

func (i *InvalidCsvPathError) Error() string

Jump to

Keyboard shortcuts

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