bluejay

module
v0.0.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2024 License: MIT

README

BlueJay Icon

Latest Release License

BlueJay

BlueJay is a framework that provides a simple interface for data analysis.

Installation

To install the bluejay package, use the following command:

go get github.com/aggnr/bluejay

Usage

Creating a data frame

You can create a data frame using the NewDataFrame function. The function takes a map of column names to slices of values as input.

package main

import (
	"fmt"
	"github.com/aggnr/bluejay/dataframe"
	"log"
)

func main() {

	type Person struct {
		Name      string
		Age       int
		Salary    float64
		IsMarried bool
	}

	people := []Person{
		{"John", 30, 50000.50, true},
		{"Jane", 25, 60000.75, false},
	}

	df, err := dataframe.NewDataFrame(people)
	if err != nil {
		log.Fatalf("Error creating DataFrame: %v", err)
	}
	defer df.Close()

	fmt.Println("DataFrame created successfully!")

}

Examples

Here are some examples demonstrating how to use BlueJay:

Basic Usage
  • hellogf - This example demonstrates how to create a simple DataFrame from a slice of structs.
  • display - This example demonstrates how to display the contents of a DataFrame.
  • head - This example demonstrates how to display the first few rows of a DataFrame.
  • info - This example demonstrates how to display summary information about a DataFrame.
  • loc - This example demonstrates how to select specific rows and columns from a DataFrame.
  • readcsv - This example demonstrates how to read data from a CSV file into a DataFrame.
  • readjsonfromfile.go - This example demonstrates how to read data from a JSON file into a DataFrame.
  • readjsonfromstring.go - This example demonstrates how to read data from a JSON string into a DataFrame.
  • tail - This example demonstrates how to display the last few rows of a DataFrame.
Advanced Usage
  • join - This example demonstrates how to join two DataFrames.
  • corr - This example demonstrates how to use the Corr method to calculate the correlation matrix of a DataFrame.
Plotting
  • dfplot - This example demonstrates how to use the Plot method to create a line plot of two columns in a DataFrame.
  • dynamicplot - This example demonstrates how to use the Plot method to create a dynamic plot of two columns.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Directories

Path Synopsis
ui command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL