Introduction
A pure-Go port of polars on top of arrow-go. Lazy plan, optimizer, streaming engine, SIMD kernels, no cgo.
golars is a pure-Go DataFrame library modeled on polars and built directly on arrow-go. No cgo. Single go build cross-compiles.
import (
"context"
"fmt"
"github.com/Gaurav-Gosain/golars/compute"
"github.com/Gaurav-Gosain/golars/dataframe"
"github.com/Gaurav-Gosain/golars/series"
)
ctx := context.Background()
names, _ := series.FromString("name", []string{"ada", "brian", "carl"}, nil)
ages, _ := series.FromInt64("age", []int64{27, 34, 19}, nil)
df, _ := dataframe.New(names, ages)
defer df.Release()
mask, _ := compute.GtLit(ctx, ages, int64(20))
adults, _ := df.Filter(ctx, mask)
defer adults.Release()
fmt.Println(adults)Highlights
- Eager + lazy execution. Build pipelines as logical plans, let the optimizer fuse projections/filters, then
Collect(ctx). - Streaming engine. Morsel-driven execution for datasets that don't fit in memory.
- Polars-grade performance. Matches or beats polars 1.39 on most polars-compare workloads.
- I/O included. CSV, Parquet, IPC, JSON, NDJSON readers/writers;
io/sqlbridge for anydatabase/sqldriver. - Scripting + REPL.
.glrscripts run viagolars run my.glror inside the interactive REPL with inline ghost-text completions. - LLM-native. MCP server exposes golars tools to Claude Desktop, Cursor, Windsurf, and other MCP hosts.
Install
go get github.com/Gaurav-Gosain/golars@latestThe CLI ships separately:
go install github.com/Gaurav-Gosain/golars/cmd/golars@latestWhere next
Getting Started
Install the library, open the REPL, run a query.
Cookbook
End-to-end recipes: read, filter, group, write.
.glr scripting
The one-command-per-line pipeline language.
SQL frontend
SELECT / FROM / WHERE / GROUP BY / ORDER BY / LIMIT.
MCP integration
Plug golars into Claude Desktop and co.
API reference
polars to golars method-level status table.