You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tablib_csv.go
    path of file: ./repos/xorm/vendor/github.com/agrison/go-tablib
    
    the code of the file until where you have to start completion: package tablib

import (
	"bytes"
	"encoding/csv"
)

// CSV returns a CSV representation of the Dataset an Exportable.
func (d *Dataset) CSV() (*Exportable, error) {
	records := d.Records()
	b := newBuffer()

	w := csv.NewWriter(b)
	w.WriteAll(records) // calls Flush internally

	if err := w.Error(
    
func LoadCSV(input []byte) (*Dataset, error) {
	reader := csv.NewReader(bytes.NewReader(input))
	records, err := reader.ReadAll()
	if err != nil {
		return nil, err
	}

	ds := NewDataset(records[0])
	for i := 1; i < len(records); i++ {
		// this is odd
		row := make([]interface{}, len(records[i]))
		for k, v := range records[i] {
			row[k] = v
		}
		ds.Append(row)
	}

	return ds, nil
}