tablef64

package
v2.18.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

table provides a struct to handle tabular data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Columns

type Columns []string

type Table

type Table struct {
	Name    string
	Columns table.Columns
	Rows    [][]float64
}

Table is useful for working on CSV data. It stores records as `[]string` with typed formatting information per-column to facilitate transformations.

func FromTableString

func FromTableString(tbl *table.Table, skipEmptyRows bool, colIndexes []uint) (*Table, error)

func NewTable

func NewTable(name string) *Table

NewTable returns a new empty `Table` struct with slices and maps set to empty (non-nil) values.

func ReadFile

func ReadFile(filename string, skipEmptyRows bool) (*Table, error)

func (*Table) PointXYsColumnIndexes

func (tbl *Table) PointXYsColumnIndexes(xColIdx, yColIdx int) (point.PointXYs, error)

func (*Table) PointXYsColumnNames

func (tbl *Table) PointXYsColumnNames(xColName, yColName string) (point.PointXYs, error)

func (*Table) ValuesColumnIndex

func (tbl *Table) ValuesColumnIndex(colIndex uint) ([]float64, error)

func (*Table) ValuesColumnName

func (tbl *Table) ValuesColumnName(colName string) ([]float64, error)

Jump to

Keyboard shortcuts

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