golars

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/sql bridge for any database/sql driver.
  • Scripting + REPL. .glr scripts run via golars run my.glr or 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@latest

The CLI ships separately:

go install github.com/Gaurav-Gosain/golars/cmd/golars@latest

Where next

On this page