Documentation ¶
Index ¶
- func Fit(ff string, pd PlotData, viaOpts ...GnuplotOpt) error
- func Plot(pd PlotData, setOpts ...GnuplotOpt) error
- func PlotN(plotdata []PlotData, setOpts ...GnuplotOpt) error
- func WriteCsv(df DataFrame, pathToFile string, skipColumnLabel bool) (os.FileInfo, error)
- func WriteExcel(df DataFrame, pathToFile string) (os.FileInfo, error)
- func WriteJson(df DataFrame, pathToFile string) (os.FileInfo, error)
- type DataFrame
- func NewDataFrame(data [][]interface{}, columns []string, indexCols []string) (DataFrame, error)
- func ReadCsv(pathToFile string, indexCols []string) (DataFrame, error)
- func ReadExcel(pathToFile, sheetName string, axis int) (DataFrame, error)
- func ReadJsonByColumns(pathToFile string, indexCols []string) (DataFrame, error)
- func ReadJsonStream(pathToFile string, indexCols []string) (DataFrame, error)
- func (df *DataFrame) ColAdd(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColDiv(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColEq(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColGt(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColLt(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColMod(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColMul(colname string, value float64) (DataFrame, error)
- func (df *DataFrame) ColSub(colname string, value float64) (DataFrame, error)
- func (df DataFrame) Columns() []string
- func (df *DataFrame) DropNaN(axis int) (DataFrame, error)
- func (df *DataFrame) GroupBy(by ...string) (GroupBy, error)
- func (df *DataFrame) Head(howMany int)
- func (df DataFrame) Index() IndexData
- func (df *DataFrame) Loc(cols []string, rows ...[]interface{}) (DataFrame, error)
- func (df *DataFrame) LocCol(col string) (Series, error)
- func (df *DataFrame) LocCols(cols ...string) (DataFrame, error)
- func (df *DataFrame) LocColsItems(cols ...string) ([][]interface{}, error)
- func (df *DataFrame) LocRows(rows ...[]interface{}) (DataFrame, error)
- func (df *DataFrame) LocRowsItems(rows ...[]interface{}) ([][]interface{}, error)
- func (df *DataFrame) MarshalJSON() ([]byte, error)
- func (df *DataFrame) Melt(colName, valueName string) (DataFrame, error)
- func (df *DataFrame) MergeDfsHorizontally(target DataFrame) (DataFrame, error)
- func (df *DataFrame) MergeDfsVertically(target DataFrame) (DataFrame, error)
- func (df *DataFrame) NewCol(colname string, data []interface{}) (DataFrame, error)
- func (df *DataFrame) NewDerivedCol(colname, srcCol string) (DataFrame, error)
- func (df *DataFrame) Pivot(column, value string) (DataFrame, error)
- func (df *DataFrame) PivotTable(index, column, value string, aggFunc StatsFunc) (DataFrame, error)
- func (df *DataFrame) Print()
- func (df *DataFrame) PrintRange(start, end int)
- func (df *DataFrame) RenameCol(colnames map[string]string) error
- func (df DataFrame) Series() []Series
- func (df *DataFrame) SortByColumns()
- func (df *DataFrame) SortByIndex(ascending bool) error
- func (df *DataFrame) SortByValues(by string, ascending bool) error
- func (df *DataFrame) SortIndexColFirst()
- func (df *DataFrame) Tail(howMany int)
- type GnuplotOpt
- func Setangles(value string) GnuplotOpt
- func Setarrow(value string) GnuplotOpt
- func Setautoscale(value string) GnuplotOpt
- func Setbmargin(value string) GnuplotOpt
- func Setborder(value string) GnuplotOpt
- func Setboxdepth(value string) GnuplotOpt
- func Setboxwidth(value string) GnuplotOpt
- func Setcbdata(value string) GnuplotOpt
- func Setcbdtics(value string) GnuplotOpt
- func Setcblabel(value string) GnuplotOpt
- func Setcbmtics(value string) GnuplotOpt
- func Setcbrange(value string) GnuplotOpt
- func Setcbtics(value string) GnuplotOpt
- func Setclip(value string) GnuplotOpt
- func Setcntrlabel(value string) GnuplotOpt
- func Setcntrparam(value string) GnuplotOpt
- func Setcolor() GnuplotOpt
- func Setcolorbox(value string) GnuplotOpt
- func Setcolormap(value string) GnuplotOpt
- func Setcolorsequence(value string) GnuplotOpt
- func Setcontour(value string) GnuplotOpt
- func Setdashtype(value string) GnuplotOpt
- func Setdatafile(value string) GnuplotOpt
- func Setdecimalsign(value string) GnuplotOpt
- func Setdgrid3d(value string) GnuplotOpt
- func Setdummy(value string) GnuplotOpt
- func Setencoding(value string) GnuplotOpt
- func Seterrorbars(value string) GnuplotOpt
- func Setfit(value string) GnuplotOpt
- func Setfontpath(value string) GnuplotOpt
- func Setformat(value string) GnuplotOpt
- func Setgrid(value string) GnuplotOpt
- func Sethidden3d(value string) GnuplotOpt
- func Sethistory(value string) GnuplotOpt
- func Sethistorysize(value string) GnuplotOpt
- func Setisosamples(value string) GnuplotOpt
- func Setisosurface(value string) GnuplotOpt
- func Setisotropic() GnuplotOpt
- func Setjitter(value string) GnuplotOpt
- func Setkey(value string) GnuplotOpt
- func Setlabel(value string) GnuplotOpt
- func Setlinetype(value string) GnuplotOpt
- func Setlink(value string) GnuplotOpt
- func Setlmargin(value string) GnuplotOpt
- func Setloadpath(value string) GnuplotOpt
- func Setlocale(value string) GnuplotOpt
- func Setlogscale(value string) GnuplotOpt
- func Setmapping(value string) GnuplotOpt
- func Setmicro(value string) GnuplotOpt
- func Setminussign(value string) GnuplotOpt
- func Setmonochrome(value string) GnuplotOpt
- func Setmouse(value string) GnuplotOpt
- func Setmttics(value string) GnuplotOpt
- func Setmultiplot(value string) GnuplotOpt
- func Setmx2tics(value string) GnuplotOpt
- func Setmy2tics(value string) GnuplotOpt
- func Setmytics(value string) GnuplotOpt
- func Setmztics(value string) GnuplotOpt
- func Setnonlinear(value string) GnuplotOpt
- func Setobject(value string) GnuplotOpt
- func Setoffsets(value string) GnuplotOpt
- func Setorigin(value string) GnuplotOpt
- func Setoutput(value string) GnuplotOpt
- func Setoverflow(value string) GnuplotOpt
- func Setpalette(value string) GnuplotOpt
- func Setparametric(value string) GnuplotOpt
- func Setpaxis(value string) GnuplotOpt
- func Setpixmap(value string) GnuplotOpt
- func Setpm3d(value string) GnuplotOpt
- func Setpointintervalbox() GnuplotOpt
- func Setpointsize(value string) GnuplotOpt
- func Setpolar() GnuplotOpt
- func Setprint(value string) GnuplotOpt
- func Setpsdir(value string) GnuplotOpt
- func Setraxis() GnuplotOpt
- func Setrgbmax(value string) GnuplotOpt
- func Setrlabel(value string) GnuplotOpt
- func Setrmargin(value string) GnuplotOpt
- func Setrrange(value string) GnuplotOpt
- func Setrtics(value string) GnuplotOpt
- func Setsamples(value string) GnuplotOpt
- func Setsize(value string) GnuplotOpt
- func Setspiderplot() GnuplotOpt
- func Setstyle(value string) GnuplotOpt
- func Setsurface(value string) GnuplotOpt
- func Settable(value string) GnuplotOpt
- func Setterminal(value string) GnuplotOpt
- func Settermoption(value string) GnuplotOpt
- func Settheta(value string) GnuplotOpt
- func Settics(value string) GnuplotOpt
- func Settimefmt(value string) GnuplotOpt
- func Settimestamp(value string) GnuplotOpt
- func Settitle(value string) GnuplotOpt
- func Settmargin(value string) GnuplotOpt
- func Settrange(value string) GnuplotOpt
- func Setttics(value string) GnuplotOpt
- func Seturange(value string) GnuplotOpt
- func Setvgrid(value string) GnuplotOpt
- func Setview(value string) GnuplotOpt
- func Setvrange(value string) GnuplotOpt
- func Setvxrange(value string) GnuplotOpt
- func Setvyrange(value string) GnuplotOpt
- func Setvzrange(value string) GnuplotOpt
- func Setwalls(value string) GnuplotOpt
- func Setx2ata(value string) GnuplotOpt
- func Setx2dtics(value string) GnuplotOpt
- func Setx2label(value string) GnuplotOpt
- func Setx2mtics(value string) GnuplotOpt
- func Setx2range(value string) GnuplotOpt
- func Setx2tics(value string) GnuplotOpt
- func Setx2zeroaxis(value string) GnuplotOpt
- func Setxdata(value string) GnuplotOpt
- func Setxdtics(value string) GnuplotOpt
- func Setxlabel(value string) GnuplotOpt
- func Setxmtics(value string) GnuplotOpt
- func Setxrange(value string) GnuplotOpt
- func Setxtics(value string) GnuplotOpt
- func Setxyplane(value string) GnuplotOpt
- func Setxzeroaxis(value string) GnuplotOpt
- func Sety2data(value string) GnuplotOpt
- func Sety2dtics(value string) GnuplotOpt
- func Sety2label(value string) GnuplotOpt
- func Sety2mtics(value string) GnuplotOpt
- func Sety2range(value string) GnuplotOpt
- func Sety2tics(value string) GnuplotOpt
- func Sety2zeroaxis(value string) GnuplotOpt
- func Setydata(value string) GnuplotOpt
- func Setydtics(value string) GnuplotOpt
- func Setylabel(value string) GnuplotOpt
- func Setymtics(value string) GnuplotOpt
- func Setyrange(value string) GnuplotOpt
- func Setytics(value string) GnuplotOpt
- func Setyzeroaxis(value string) GnuplotOpt
- func Setzdata(value string) GnuplotOpt
- func Setzdtics(value string) GnuplotOpt
- func Setzero(value string) GnuplotOpt
- func Setzlabel(value string) GnuplotOpt
- func Setzmtics(value string) GnuplotOpt
- func Setzrange(value string) GnuplotOpt
- func Setztics(value string) GnuplotOpt
- func Setzzeroaxis(value string) GnuplotOpt
- func Unsetcornerpoles() GnuplotOpt
- func Using(value string) GnuplotOpt
- func Via(value string) GnuplotOpt
- func With(value string) GnuplotOpt
- type GroupBy
- type Index
- type IndexData
- type PlotData
- type Series
- func (s *Series) At(ind ...interface{}) (interface{}, error)
- func (s *Series) Count() StatsResult
- func (s Series) Data() []interface{}
- func (s *Series) Describe() ([]StatsResult, error)
- func (s Series) Dtype() string
- func (s *Series) Head(howMany int)
- func (s *Series) IAt(ind int) (interface{}, error)
- func (s *Series) ILoc(min, max int) ([]interface{}, error)
- func (s Series) Index() IndexData
- func (s *Series) IndexHasDuplicateValues() (bool, error)
- func (s Series) Len() int
- func (s Series) Less(i, j int) bool
- func (s *Series) Loc(idx ...[]interface{}) (Series, error)
- func (s *Series) LocItems(idx ...[]interface{}) ([]interface{}, error)
- func (s *Series) Max() StatsResult
- func (s *Series) Mean() StatsResult
- func (s *Series) Median() StatsResult
- func (s *Series) Min() StatsResult
- func (s Series) Name() string
- func (s *Series) Print()
- func (s *Series) PrintRange(start, end int)
- func (s *Series) Q1() StatsResult
- func (s *Series) Q2() StatsResult
- func (s *Series) Q3() StatsResult
- func (s *Series) RenameCol(newName string)
- func (s *Series) RenameIndex(newNames map[string]string) error
- func (s *Series) SortByGivenIndex(index IndexData, withId bool) error
- func (s *Series) SortByIndex(ascending bool) error
- func (s *Series) SortByValues(ascending bool) error
- func (s *Series) Std() StatsResult
- func (s Series) Swap(i, j int)
- func (s *Series) Tail(howMany int)
- func (s *Series) ValueCounts() (Series, error)
- type StatsFunc
- type StatsResult
- func Count(dataset []interface{}) StatsResult
- func Max(dataset []interface{}) StatsResult
- func Mean(dataset []interface{}) StatsResult
- func Median(dataset []interface{}) StatsResult
- func Min(dataset []interface{}) StatsResult
- func Q1(dataset []interface{}) StatsResult
- func Q2(dataset []interface{}) StatsResult
- func Q3(dataset []interface{}) StatsResult
- func Std(dataset []interface{}) StatsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fit ¶ added in v0.2.1
func Fit(ff string, pd PlotData, viaOpts ...GnuplotOpt) error
Fit fits a user-defined function ff to data given in PlotData pd, and prints out the results.
Pass options such as `using` in pd, but `via` in viaOpts.
func Plot ¶ added in v0.2.1
func Plot(pd PlotData, setOpts ...GnuplotOpt) error
Plot plots a set of data given by the PlotData object `pd`.
Pass in any `set` options you need. Refer to the gnuplot documentation for `set` options.
func PlotN ¶ added in v0.2.1
func PlotN(plotdata []PlotData, setOpts ...GnuplotOpt) error
PlotN plots several PlotData objects `pd` in one graph. Use PlotN when you want to compare two different datasets, or a dataset with a line of best fit.
Refer to the gnuplot documentation for `set` options.
func WriteCsv ¶
WriteCsv writes a DataFrame object to CSV file. It is recommended to generate pathToFile using `filepath.Join`.
func WriteExcel ¶ added in v0.1.0
WriteExcel writes a DataFrame object into an Excel file.
Types ¶
type DataFrame ¶
type DataFrame struct {
// contains filtered or unexported fields
}
DataFrame type represents a 2D tabular dataset. A DataFrame object is comprised of multiple Series objects.
func NewDataFrame ¶
NewDataFrame created a new DataFrame object from given parameters. Generally, NewDataFrameFromFile will be used more often.
func ReadCsv ¶
ReadCsv reads a CSV file and returns a new DataFrame object. It is recommended to generate pathToFile using `filepath.Join`.
func ReadExcel ¶ added in v0.1.0
ReadExcel reads an excel file and converts it to a DataFrame object. The axis depends on the layout of the data. Row-based data where each group represents a row will have an axis=0. Column-based data where each group represents a column will have an axis=1.
func ReadJsonByColumns ¶
ReadJson reads a JSON file and returns a new DataFrame object. It is recommended to generate pathToFile using `filepath.Join`. The JSON file should be in this format: {"col1":[val1, val2, ...], "col2":[val1, val2, ...], ...} You can either set a column to be the index, or set it as nil. If nil, a new RangeIndex will be created. Your index column should not have any missing values. Order of columns is not guaranteed, but the index column will always come first.
func ReadJsonStream ¶
ReadJsonStream reads a JSON stream and returns a new DataFrame object. The JSON file should be in this format: {"col1":val1, "col2":val2, ...}{"col1":val1, "col2":val2, ...}
func (*DataFrame) ColEq ¶
ColEq checks if each element in the specified column is equal to the given value.
func (*DataFrame) ColGt ¶
ColGt checks if each element in the specified column is greater than the given value.
func (*DataFrame) ColLt ¶
ColLt checks if each element in the specified column is less than the given value.
func (*DataFrame) ColMod ¶
ColMod applies modulus calculations on each element in the specified column, returning the remainder.
func (*DataFrame) ColMul ¶
ColMul multiplies each element in the specified column by the given value.
func (*DataFrame) ColSub ¶
ColSub subtracts the given value from each element in the specified column.
func (*DataFrame) DropNaN ¶
DropNaN drops rows or columns with NaN values. Specify axis to choose whether to remove rows with NaN or columns with NaN. axis=0 is row, axis=1 is column.
func (*DataFrame) GroupBy ¶
GroupBy groups selected columns in a DataFrame object and returns a GroupBy object.
func (*DataFrame) Loc ¶
Loc indexes the DataFrame object given a slice of row and column labels, and returns the result as a new DataFrame object. You are only allowed to pass in indices of the DataFrame as rows.
func (*DataFrame) LocCols ¶
LocCols returns a set of columns as a new DataFrame object, given a list of labels.
func (*DataFrame) LocColsItems ¶
LocColsItems will return a slice of columns. Use this over LocCols if you want to extract the items directly instead of getting a DataFrame object.
func (*DataFrame) LocRows ¶
LocRows returns a set of rows as a new DataFrame object, given a list of labels. You are only allowed to pass in the indices of the DataFrame as rows.
func (*DataFrame) LocRowsItems ¶
LocRowsItems will return a slice of rows. You are only allowed to pass in indices of the DataFrame as rows. Use this over LocRows if you want to extract the items directly instead of getting a DataFrame object.
func (*DataFrame) MarshalJSON ¶
MarshalJSON is used to implement the json.Marshaler interface{}.
func (*DataFrame) Melt ¶
Melt returns the table from wide to long format. Use Melt to revert to pre-Pivot format.
func (*DataFrame) MergeDfsHorizontally ¶ added in v0.1.0
MergeDfsHorizontally merges two DataFrame objects side by side. The target DataFrame will always be appended to the right of the source DataFrame. Index will reset and become a RangeIndex.
func (*DataFrame) MergeDfsVertically ¶ added in v0.1.0
MergeDfsVertically stacks two DataFrame objects vertically.
func (*DataFrame) NewCol ¶
NewCol creates a new column with the given data and column name. To create a blank column, pass in nil.
func (*DataFrame) NewDerivedCol ¶
NewDerivedCol creates a new column derived from an existing column. It copies over the data from srcCol into a new column.
func (*DataFrame) Pivot ¶
Pivot returns an organized Dataframe that has values corresponding to the index and the given column.
func (*DataFrame) PivotTable ¶
PivotTable rearranges the data by a given index and column. Each value will be aggregated via an aggregation function. Pick three columns from the DataFrame, each to serve as the index, column, and value. PivotTable ignores NaN values.
func (*DataFrame) PrintRange ¶
PrintRange prints data in a DataFrame object at a given range. Index starts at 0.
func (*DataFrame) SortByColumns ¶
func (df *DataFrame) SortByColumns()
SortByColumns sorts the columns of the DataFrame object.
func (*DataFrame) SortByIndex ¶
SortByIndex sorts the items by index.
func (*DataFrame) SortByValues ¶
SortByValues sorts the items by values in a selected Series.
func (*DataFrame) SortIndexColFirst ¶
func (df *DataFrame) SortIndexColFirst()
SortIndexColFirst puts the index column at the front.
type GnuplotOpt ¶ added in v0.2.0
type GnuplotOpt interface {
// contains filtered or unexported methods
}
A GnuplotOpt represents an option in gnuplot.
func Setangles ¶ added in v0.2.2
func Setangles(value string) GnuplotOpt
func Setarrow ¶ added in v0.2.0
func Setarrow(value string) GnuplotOpt
func Setautoscale ¶ added in v0.2.0
func Setautoscale(value string) GnuplotOpt
func Setbmargin ¶ added in v0.2.0
func Setbmargin(value string) GnuplotOpt
func Setborder ¶ added in v0.2.0
func Setborder(value string) GnuplotOpt
func Setboxdepth ¶ added in v0.2.0
func Setboxdepth(value string) GnuplotOpt
func Setboxwidth ¶ added in v0.2.0
func Setboxwidth(value string) GnuplotOpt
func Setcbdata ¶ added in v0.2.0
func Setcbdata(value string) GnuplotOpt
func Setcbdtics ¶ added in v0.2.0
func Setcbdtics(value string) GnuplotOpt
func Setcblabel ¶ added in v0.2.0
func Setcblabel(value string) GnuplotOpt
func Setcbmtics ¶ added in v0.2.0
func Setcbmtics(value string) GnuplotOpt
func Setcbrange ¶ added in v0.2.0
func Setcbrange(value string) GnuplotOpt
func Setcbtics ¶ added in v0.2.0
func Setcbtics(value string) GnuplotOpt
func Setclip ¶ added in v0.2.0
func Setclip(value string) GnuplotOpt
func Setcntrlabel ¶ added in v0.2.0
func Setcntrlabel(value string) GnuplotOpt
func Setcntrparam ¶ added in v0.2.0
func Setcntrparam(value string) GnuplotOpt
func Setcolor ¶ added in v0.2.0
func Setcolor() GnuplotOpt
func Setcolorbox ¶ added in v0.2.0
func Setcolorbox(value string) GnuplotOpt
func Setcolormap ¶ added in v0.2.0
func Setcolormap(value string) GnuplotOpt
func Setcolorsequence ¶ added in v0.2.0
func Setcolorsequence(value string) GnuplotOpt
func Setcontour ¶ added in v0.2.0
func Setcontour(value string) GnuplotOpt
func Setdashtype ¶ added in v0.2.0
func Setdashtype(value string) GnuplotOpt
func Setdatafile ¶ added in v0.2.0
func Setdatafile(value string) GnuplotOpt
func Setdecimalsign ¶ added in v0.2.0
func Setdecimalsign(value string) GnuplotOpt
func Setdgrid3d ¶ added in v0.2.0
func Setdgrid3d(value string) GnuplotOpt
func Setdummy ¶ added in v0.2.0
func Setdummy(value string) GnuplotOpt
func Setencoding ¶ added in v0.2.0
func Setencoding(value string) GnuplotOpt
func Seterrorbars ¶ added in v0.2.0
func Seterrorbars(value string) GnuplotOpt
func Setfit ¶ added in v0.2.0
func Setfit(value string) GnuplotOpt
func Setfontpath ¶ added in v0.2.0
func Setfontpath(value string) GnuplotOpt
func Setformat ¶ added in v0.2.0
func Setformat(value string) GnuplotOpt
func Setgrid ¶ added in v0.2.0
func Setgrid(value string) GnuplotOpt
func Sethidden3d ¶ added in v0.2.0
func Sethidden3d(value string) GnuplotOpt
func Sethistory ¶ added in v0.2.0
func Sethistory(value string) GnuplotOpt
func Sethistorysize ¶ added in v0.2.0
func Sethistorysize(value string) GnuplotOpt
func Setisosamples ¶ added in v0.2.0
func Setisosamples(value string) GnuplotOpt
func Setisosurface ¶ added in v0.2.0
func Setisosurface(value string) GnuplotOpt
func Setisotropic ¶ added in v0.2.0
func Setisotropic() GnuplotOpt
func Setjitter ¶ added in v0.2.0
func Setjitter(value string) GnuplotOpt
func Setkey ¶ added in v0.2.0
func Setkey(value string) GnuplotOpt
func Setlabel ¶ added in v0.2.0
func Setlabel(value string) GnuplotOpt
func Setlinetype ¶ added in v0.2.1
func Setlinetype(value string) GnuplotOpt
func Setlink ¶ added in v0.2.0
func Setlink(value string) GnuplotOpt
func Setlmargin ¶ added in v0.2.0
func Setlmargin(value string) GnuplotOpt
func Setloadpath ¶ added in v0.2.0
func Setloadpath(value string) GnuplotOpt
func Setlocale ¶ added in v0.2.0
func Setlocale(value string) GnuplotOpt
func Setlogscale ¶ added in v0.2.0
func Setlogscale(value string) GnuplotOpt
func Setmapping ¶ added in v0.2.0
func Setmapping(value string) GnuplotOpt
func Setmicro ¶ added in v0.2.0
func Setmicro(value string) GnuplotOpt
func Setminussign ¶ added in v0.2.0
func Setminussign(value string) GnuplotOpt
func Setmonochrome ¶ added in v0.2.0
func Setmonochrome(value string) GnuplotOpt
func Setmouse ¶ added in v0.2.0
func Setmouse(value string) GnuplotOpt
func Setmttics ¶ added in v0.2.0
func Setmttics(value string) GnuplotOpt
func Setmultiplot ¶ added in v0.2.0
func Setmultiplot(value string) GnuplotOpt
func Setmx2tics ¶ added in v0.2.0
func Setmx2tics(value string) GnuplotOpt
func Setmy2tics ¶ added in v0.2.0
func Setmy2tics(value string) GnuplotOpt
func Setmytics ¶ added in v0.2.0
func Setmytics(value string) GnuplotOpt
func Setmztics ¶ added in v0.2.0
func Setmztics(value string) GnuplotOpt
func Setnonlinear ¶ added in v0.2.0
func Setnonlinear(value string) GnuplotOpt
func Setobject ¶ added in v0.2.0
func Setobject(value string) GnuplotOpt
func Setoffsets ¶ added in v0.2.0
func Setoffsets(value string) GnuplotOpt
func Setorigin ¶ added in v0.2.0
func Setorigin(value string) GnuplotOpt
func Setoutput ¶ added in v0.2.0
func Setoutput(value string) GnuplotOpt
func Setoverflow ¶ added in v0.2.0
func Setoverflow(value string) GnuplotOpt
func Setpalette ¶ added in v0.2.0
func Setpalette(value string) GnuplotOpt
func Setparametric ¶ added in v0.2.0
func Setparametric(value string) GnuplotOpt
func Setpaxis ¶ added in v0.2.0
func Setpaxis(value string) GnuplotOpt
func Setpixmap ¶ added in v0.2.0
func Setpixmap(value string) GnuplotOpt
func Setpm3d ¶ added in v0.2.0
func Setpm3d(value string) GnuplotOpt
func Setpointintervalbox ¶ added in v0.2.0
func Setpointintervalbox() GnuplotOpt
func Setpointsize ¶ added in v0.2.0
func Setpointsize(value string) GnuplotOpt
func Setpolar ¶ added in v0.2.0
func Setpolar() GnuplotOpt
func Setprint ¶ added in v0.2.0
func Setprint(value string) GnuplotOpt
func Setpsdir ¶ added in v0.2.0
func Setpsdir(value string) GnuplotOpt
func Setraxis ¶ added in v0.2.0
func Setraxis() GnuplotOpt
func Setrgbmax ¶ added in v0.2.0
func Setrgbmax(value string) GnuplotOpt
func Setrlabel ¶ added in v0.2.0
func Setrlabel(value string) GnuplotOpt
func Setrmargin ¶ added in v0.2.0
func Setrmargin(value string) GnuplotOpt
func Setrrange ¶ added in v0.2.0
func Setrrange(value string) GnuplotOpt
func Setrtics ¶ added in v0.2.0
func Setrtics(value string) GnuplotOpt
func Setsamples ¶ added in v0.2.0
func Setsamples(value string) GnuplotOpt
func Setsize ¶ added in v0.2.0
func Setsize(value string) GnuplotOpt
func Setspiderplot ¶ added in v0.2.0
func Setspiderplot() GnuplotOpt
func Setstyle ¶ added in v0.2.0
func Setstyle(value string) GnuplotOpt
func Setsurface ¶ added in v0.2.0
func Setsurface(value string) GnuplotOpt
func Settable ¶ added in v0.2.0
func Settable(value string) GnuplotOpt
func Setterminal ¶ added in v0.2.0
func Setterminal(value string) GnuplotOpt
func Settermoption ¶ added in v0.2.0
func Settermoption(value string) GnuplotOpt
func Settheta ¶ added in v0.2.0
func Settheta(value string) GnuplotOpt
func Settics ¶ added in v0.2.0
func Settics(value string) GnuplotOpt
func Settimefmt ¶ added in v0.2.1
func Settimefmt(value string) GnuplotOpt
func Settimestamp ¶ added in v0.2.0
func Settimestamp(value string) GnuplotOpt
func Settitle ¶ added in v0.2.0
func Settitle(value string) GnuplotOpt
func Settmargin ¶ added in v0.2.0
func Settmargin(value string) GnuplotOpt
func Settrange ¶ added in v0.2.0
func Settrange(value string) GnuplotOpt
func Setttics ¶ added in v0.2.0
func Setttics(value string) GnuplotOpt
func Seturange ¶ added in v0.2.0
func Seturange(value string) GnuplotOpt
func Setvgrid ¶ added in v0.2.0
func Setvgrid(value string) GnuplotOpt
func Setview ¶ added in v0.2.0
func Setview(value string) GnuplotOpt
func Setvrange ¶ added in v0.2.0
func Setvrange(value string) GnuplotOpt
func Setvxrange ¶ added in v0.2.0
func Setvxrange(value string) GnuplotOpt
func Setvyrange ¶ added in v0.2.0
func Setvyrange(value string) GnuplotOpt
func Setvzrange ¶ added in v0.2.0
func Setvzrange(value string) GnuplotOpt
func Setwalls ¶ added in v0.2.0
func Setwalls(value string) GnuplotOpt
func Setx2ata ¶ added in v0.2.0
func Setx2ata(value string) GnuplotOpt
func Setx2dtics ¶ added in v0.2.0
func Setx2dtics(value string) GnuplotOpt
func Setx2label ¶ added in v0.2.0
func Setx2label(value string) GnuplotOpt
func Setx2mtics ¶ added in v0.2.0
func Setx2mtics(value string) GnuplotOpt
func Setx2range ¶ added in v0.2.0
func Setx2range(value string) GnuplotOpt
func Setx2tics ¶ added in v0.2.0
func Setx2tics(value string) GnuplotOpt
func Setx2zeroaxis ¶ added in v0.2.0
func Setx2zeroaxis(value string) GnuplotOpt
func Setxdata ¶ added in v0.2.1
func Setxdata(value string) GnuplotOpt
func Setxdtics ¶ added in v0.2.0
func Setxdtics(value string) GnuplotOpt
func Setxlabel ¶ added in v0.2.0
func Setxlabel(value string) GnuplotOpt
func Setxmtics ¶ added in v0.2.0
func Setxmtics(value string) GnuplotOpt
func Setxrange ¶ added in v0.2.0
func Setxrange(value string) GnuplotOpt
func Setxtics ¶ added in v0.2.0
func Setxtics(value string) GnuplotOpt
func Setxyplane ¶ added in v0.2.0
func Setxyplane(value string) GnuplotOpt
func Setxzeroaxis ¶ added in v0.2.0
func Setxzeroaxis(value string) GnuplotOpt
func Sety2data ¶ added in v0.2.0
func Sety2data(value string) GnuplotOpt
func Sety2dtics ¶ added in v0.2.0
func Sety2dtics(value string) GnuplotOpt
func Sety2label ¶ added in v0.2.0
func Sety2label(value string) GnuplotOpt
func Sety2mtics ¶ added in v0.2.0
func Sety2mtics(value string) GnuplotOpt
func Sety2range ¶ added in v0.2.0
func Sety2range(value string) GnuplotOpt
func Sety2tics ¶ added in v0.2.0
func Sety2tics(value string) GnuplotOpt
func Sety2zeroaxis ¶ added in v0.2.0
func Sety2zeroaxis(value string) GnuplotOpt
func Setydata ¶ added in v0.2.1
func Setydata(value string) GnuplotOpt
func Setydtics ¶ added in v0.2.0
func Setydtics(value string) GnuplotOpt
func Setylabel ¶ added in v0.2.0
func Setylabel(value string) GnuplotOpt
func Setymtics ¶ added in v0.2.0
func Setymtics(value string) GnuplotOpt
func Setyrange ¶ added in v0.2.0
func Setyrange(value string) GnuplotOpt
func Setytics ¶ added in v0.2.0
func Setytics(value string) GnuplotOpt
func Setyzeroaxis ¶ added in v0.2.0
func Setyzeroaxis(value string) GnuplotOpt
func Setzdata ¶ added in v0.2.0
func Setzdata(value string) GnuplotOpt
func Setzdtics ¶ added in v0.2.0
func Setzdtics(value string) GnuplotOpt
func Setzero ¶ added in v0.2.0
func Setzero(value string) GnuplotOpt
func Setzlabel ¶ added in v0.2.0
func Setzlabel(value string) GnuplotOpt
func Setzmtics ¶ added in v0.2.0
func Setzmtics(value string) GnuplotOpt
func Setzrange ¶ added in v0.2.0
func Setzrange(value string) GnuplotOpt
func Setztics ¶ added in v0.2.0
func Setztics(value string) GnuplotOpt
func Setzzeroaxis ¶ added in v0.2.0
func Setzzeroaxis(value string) GnuplotOpt
func Unsetcornerpoles ¶ added in v0.2.0
func Unsetcornerpoles() GnuplotOpt
func Using ¶ added in v0.2.0
func Using(value string) GnuplotOpt
func Via ¶ added in v0.2.1
func Via(value string) GnuplotOpt
func With ¶ added in v0.2.1
func With(value string) GnuplotOpt
type GroupBy ¶
type GroupBy struct {
// contains filtered or unexported fields
}
GroupBy type is a intermediary struct that is created after running DataFrame.GroupBy(). It holds the necessary data for applying operations such as GroupBy.Agg().
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index stores the index values of a series and dataframe. The 0th element must be the ID of the index. For example, if your data includes a column of names that you have set to be the index, the index may look like this: Index{0, "Alice"}, Index{1, "Bob"}, Index{2, "Charlie"}. Index{} with more than one value (not including the ID) is considered a multi-index.
type IndexData ¶
type IndexData struct {
// contains filtered or unexported fields
}
IndexData type is used to hold index information of a Series or a DataFrame.
func CreateRangeIndex ¶
CreateRangeIndex takes the length of an Index and creates a RangeIndex. RangeIndex is an index that spans from 0 to the length of the index.
func NewIndexData ¶ added in v0.2.2
NewIndexData creates a new IndexData object.
type PlotData ¶ added in v0.2.1
type PlotData struct { // Df is the DataFrame object you would like to plot. Df *DataFrame // Columns are the columns in Df that you want to plot. Usually, it's a pair of columns [xcol, ycol]. // If you want to create a bar graph or a histogram, you can add more columns. Columns []string // Function is an arbitrary function such as sin(x) or an equation of the line of best fit. Function string // Opts are options such as `using` or `with`. `set` is passed in as an argument for other plotting functions. Opts []GnuplotOpt }
A PlotData holds the data required for plotting.
If you want to plot an arbitrary function, leave Df and Columns as nil. Otherwise, populate Df and Columns, and leave Function as "".
type Series ¶
type Series struct {
// contains filtered or unexported fields
}
A Series represents a column of data.
func NewSeries ¶
NewSeries created a new Series object from given parameters. Generally, NewSeriesFromFile will be used more often. The index parameter can be set to nil when calling NewSeries on its own. This field is for passing in the DataFrame's index data in NewDataFrame.
func (*Series) At ¶
At returns an element at a given index. For multiindex, you need to pass in the whole index tuple.
func (*Series) Count ¶
func (s *Series) Count() StatsResult
Count counts the number of non-NaN elements in a column.
func (*Series) Describe ¶
func (s *Series) Describe() ([]StatsResult, error)
Describe runs through the most commonly used statistics functions and prints the output.
func (*Series) IndexHasDuplicateValues ¶
IndexHasDuplicateValues checks if the Series have duplicate index values.
func (*Series) Loc ¶
Loc accepts index tuples and returns a Series object containing data at the given rows. Each idx item should contain the index of the data you would like to query. For multiindex Series, you can either pass in the whole index tuple, or the first index.
func (*Series) LocItems ¶
LocItems acts the exact same as Loc, but returns data as []interface{} instead of Series.
func (*Series) Max ¶
func (s *Series) Max() StatsResult
Max returns the largest element is a column.
func (*Series) Mean ¶
func (s *Series) Mean() StatsResult
Mean returns the mean of the elements in a column.
func (*Series) Median ¶
func (s *Series) Median() StatsResult
Median returns the median of the elements in a column.
func (*Series) Min ¶
func (s *Series) Min() StatsResult
Min returns the smallest element in a column.
func (*Series) PrintRange ¶
PrintRange prints data in a Series object at a given range. Index starts at 0.
func (*Series) Q1 ¶
func (s *Series) Q1() StatsResult
Q1 returns the lower quartile (25%) of the elements in a column. This does not include the median during calculation.
func (*Series) Q2 ¶
func (s *Series) Q2() StatsResult
Q2 returns the middle quartile (50%) of the elements in a column. This accomplishes the same thing as Median.
func (*Series) Q3 ¶
func (s *Series) Q3() StatsResult
Q3 returns the upper quartile (75%) of the elements in a column. This does not include the median during calculation.
func (*Series) RenameIndex ¶
RenameIndex renames the index of the series. Input should be a map, where key is the index name to change and value is a new name.
func (*Series) SortByGivenIndex ¶
SortByGivenIndex sorts the Series by a given index.
func (*Series) SortByIndex ¶
SortByIndex sorts the elements in a Series by index. Pass in true if you want to sort in ascending order, and false for descending order.
func (*Series) SortByValues ¶
SortByValues sorts the Series by its values. Pass in true if you want to sort in ascending order, and false for descending order.
func (*Series) Std ¶
func (s *Series) Std() StatsResult
Std returns the sample standard deviation of the elements in a column.
func (*Series) ValueCounts ¶
ValueCounts returns a Series containing the number of unique values in a given Series.
type StatsFunc ¶
type StatsFunc func(dataset []interface{}) StatsResult
StatsFunc represents any function that accepts dataset as input and returns StatsResult as output.
type StatsResult ¶
StatsResult holds the results of calculation from a statistics function such as Mean or Median.
func Count ¶
func Count(dataset []interface{}) StatsResult
Count counts the number of non-NaN elements in a dataset.
func Max ¶
func Max(dataset []interface{}) StatsResult
Max returns the largest element is a dataset.
func Mean ¶
func Mean(dataset []interface{}) StatsResult
Mean returns the mean of the elements in a dataset.
func Median ¶
func Median(dataset []interface{}) StatsResult
Median returns the median of the elements in a dataset.
func Min ¶
func Min(dataset []interface{}) StatsResult
Min returns the smallest element in a dataset.
func Q1 ¶
func Q1(dataset []interface{}) StatsResult
Q1 returns the lower quartile (25%) of the elements in a dataset. This does not include the median during calculation.
func Q2 ¶
func Q2(dataset []interface{}) StatsResult
Q2 returns the middle quartile (50%) of the elements in a dataset. This accomplishes the same thing as Median.
func Q3 ¶
func Q3(dataset []interface{}) StatsResult
Q3 returns the upper quartile (75%) of the elements in a dataset. This does not include the median during calculation.
func Std ¶
func Std(dataset []interface{}) StatsResult
Std returns the sample standard deviation of the elements in a dataset.