Skip to content

Releases: jpoly1219/gambas

v0.2.2

09 Aug 02:08

Choose a tag to compare

Changelog for v0.2.2

==Documentation Update==

New features:

  • We have a new documentation page! I thought that pkg.go.dev page left a lot to be desired, so I made a separate documentation page for a better experience.
  • Series, DataFrame, IndexData, and Index types now have a getter method that returns its private field values.
type Series struct {
	data  []interface{}
	index IndexData
	name  string
	dtype string
}

func (s Series) Data() []interface{} {
	return s.data
}

func (s Series) Index() IndexData {
	return s.index
}

func (s Series) Name() string {
	return s.name
}

func (s Series) Dtype() string {
	return s.dtype
}
type DataFrame struct {
	series  []Series
	index   IndexData
	columns []string
}

func (df DataFrame) Series() []Series {
	return df.series
}

func (df DataFrame) Index() IndexData {
	return df.index
}
func (df DataFrame) Columns() []string {
	return df.columns
}
type IndexData struct {
	index []Index
	names []string
}

func (id IndexData) Index() []Index {
	return id.index
}

func (id IndexData) Names() []string {
	return id.names
}
type Index struct {
	id    int
	value []interface{}
}

func (i Index) Id() int {
	return i.id
}

func (i Index) Value() []interface{} {
	return i.value
}
  • df.LocCol is a method that returns a column as a Series object. It's different from the preexisting LocCols which returns a DataFrame object.
func (df *DataFrame) LocCol(col string) (Series, error)

Changes

  • Describe now returns a []StatsResult instead of []float64.
  • SortByGivenIndex now accepts withId field for internal uses. For normal use, just pass false.

Bug fixes

  • Fit no longer bugs out while reading certain CSV files.

v0.2.1

21 Jul 01:43

Choose a tag to compare

Changelog for v0.2.1

New features:

  • More features for plotting!
    • PlotData type for storing plot data.
    // 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 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
    }
    • PlotN can be used to plot several graphs at once.
    • Fit can be used to fit an arbitrary function to your PlotData object.
    • Options added: with, via

Changes

  • Plot is no longer a struct method for DataFrame. Instead, it is a standalone function that accepts PlotData objects.

Bug fixes

  • Commands with set are properly parsed without omitting semicolons.
  • Double quotes are no longer dropped unexpectedly.

v0.2.0

18 Jul 02:52

Choose a tag to compare

Changelog for v0.2.0

New features:

  • Plotting is here! Use Plot to plot your DataFrame object.
    • Plotting uses gnuplot as a backend. To use the plotting feature, you need to install gnuplot first.
    • This feature is quite basic at the moment; more features and granular control will be added in later updates!

v.0.1.0

18 Jul 02:16

Choose a tag to compare

Changelog for v0.1.0

New features:

  • You can now merge DataFrame objects horizontally and vertically using MergeDfsHorizontally and MergeDfsVertically.
  • Basic support for reading and writing Excel files has arrived! Use ReadExcel and WriteExcel.

Bug fixes:

  • ReadJsonStream now properly catches JSON tokens.
  • ReadJsonStream now sorts the resulting DataFrame object newDf before returning.
  • NewCol, NewDerivedCol, RenameCol no longer modifies the original DataFrame object.
  • ReadCsv now uses RangeIndex instead of the first column of data.

Optimization

  • Mean, Std, Min, Max now run faster.
  • All NaN values will now use math.NaN instead of mixing math.NaN and "NaN".