Documentation
¶
Index ¶
- func CreateNewCSV(filePath string, columns []string, delimiter rune) error
- type DataFrame
- func (df *DataFrame) AddColumn(name string, values []string) error
- func (df *DataFrame) AddRow(row []string) error
- func (df *DataFrame) AddRowAndSave(row []string, filepath string) error
- func (df *DataFrame) AddUniqueRow(row []string) error
- func (df *DataFrame) AddUniqueRowAndSave(row []string, filepath string) error
- func (df *DataFrame) DeleteRow(index int) error
- func (df *DataFrame) DeleteRowAndSave(index int, filePath string) error
- func (df *DataFrame) DeleteRowByColumnValue(columnName, value string) error
- func (df *DataFrame) DeleteRowByColumnValueAndSave(columnName, value, filePath string) error
- func (df *DataFrame) GetAllColumns() [][]string
- func (df *DataFrame) GetColumnByName(name string) ([]string, error)
- func (df *DataFrame) GetRowsAsStrings(delimeter string) []string
- func (df *DataFrame) LoadCSV(filePath string) error
- func (df *DataFrame) SaveCSV(filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataFrame ¶
type DataFrame struct {
Columns []string // column names
Data [][]string // rows of data (each row is a slice of strings)
// contains filtered or unexported fields
}
DataFrame is a structure for storing tabular data
func NewDataFrame ¶
NewDataFrame creates an empty DataFrame with a specified delimiter
func (*DataFrame) AddRowAndSave ¶
AddRowAndSave adds a row and saves the DataFrame to a CSV file
func (*DataFrame) AddUniqueRow ¶
AddUniqueRow adds a row only if it is not already in the DataFrame
func (*DataFrame) AddUniqueRowAndSave ¶
AddUniqueRowAndSave adds a row only if it is not already in the DataFrame and saves the DataFrame to a CSV file
func (*DataFrame) DeleteRowAndSave ¶
DeleteRowAndSave deletes the row by index and saves the DataFrame to a CSV file
func (*DataFrame) DeleteRowByColumnValue ¶
DeleteRowByColumnValue deletes the first row by value in the specified column
func (*DataFrame) DeleteRowByColumnValueAndSave ¶
DeleteRowByColumnValueAndSave deletes the row by index and saves the DataFrame to a CSV file and saves the DataFrame to a CSV file
func (*DataFrame) GetAllColumns ¶
GetAllColumns returns a two-dimensional array: each inner array is a separate column
func (*DataFrame) GetColumnByName ¶
GetColumnByName returns all column values by name
func (*DataFrame) GetRowsAsStrings ¶
GetRowsAsStrings returns a slice of rows, where each row is a these are the combined values of a single DataFrame data string using a delimiter