Kuala — A simple, Go-powered data analysis library inspired by pandas! Bring the power of data frames to your Go projects with minimal boilerplate.
- CSV I/O: Read and manipulate CSV files with ease.
- Data Operations: Perform common analyses:
Sum()Std()(Standard Deviation)Col()specific columnsLoc()to retrieve specific rows
- Lightweight & Fast: Designed for high performance in Go environments.
go get github.com/zyadamr-dev/Kualapackage main
import (
"fmt"
"github.com/zyadamr-dev/Kuala"
)
func main() {
// Load the CSV data
df, err := io.ReadCSV("data.csv")
if err != nil {
panic(err)
}
// Sum of the "Age" column
totalAge := df.Sum("Age")
fmt.Println("Total Age:", totalAge)
// Standard deviation of the "Score" column
scoreStd := df.Std("Score")
fmt.Println("Score Std Dev:", scoreStd)
// Select "Name" and "Email" columns
subset := df.Col("Name", "Email")
fmt.Println(subset)
// Retrieve the 5th row (zero-based index)
row := df.Loc(4)
fmt.Println("Row 5:", row)
}