func (dt *Table) SaveCSV(filename gi.FileName, delim Delims, headers bool) error {
	fp, err := os.Create(string(filename))
	defer fp.Close()
	if err != nil {
		log.Println(err)
		return err
	}
	bw := bufio.NewWriter(fp)
	err = dt.WriteCSV(bw, delim, headers)
	bw.Flush()
	return err
}
SaveCSV writes a table to a comma-separated-values (CSV) file
(where comma = any delimiter, specified in the delim arg).
If headers = true then generate C++ emergent-tyle column headers.
These headers have full configuration information for the tensor
columns.  Otherwise, only the data is written.
package etable
import (
	"bufio"
	"encoding/csv"
	"fmt"
	"io"
	"log"
	"math"
	"os"
	"strconv"
	"strings"
	"github.com/emer/etable/etensor"
	"github.com/goki/gi/gi"
	"github.com/goki/ki/kit"
)
type Delims int32
var KiT_Delims = kit.Enums.AddEnum(DelimsN, kit.NotBitFlag, nil)
func (ev Delims) MarshalJSON() ([]byte, error)  { return kit.EnumMarshalJSON(ev) }
func (ev *Delims) UnmarshalJSON(b []byte) error { return kit.EnumUnmarshalJSON(ev, b) }
const (
	Tab Delims = iota
	Comma
	Space
	Detect
	DelimsN
)
func (dl Delims) Rune() rune {
	switch dl {
	case Tab:
		return '\t'
	case Comma:
		return ','
	case Space:
		return ' '
	}
	return '\t'
}
const (
	Headers = true
	NoHeaders = false
)