00 · kiraa beta · apple silicon

Dataframes that run at the metal.

SwiftPandas brings the grammar of pandas to native Swift — typed, deterministic, and built on Accelerate for the unified memory of Apple Silicon. It is the dataframe layer beneath Kiraa, open-sourced. No Python runtime, no cloud round-trip.

kiraa beta — early, open, and looking for collaborators.

[01] What it is

The grammar of pandas, on your own hardware.

The verbs you already know — filter, groupBy, agg, join — typed at compile time and run where the data lives.

SwiftPandas is a native, columnar dataframe library for Swift. Aggregations run through Accelerate and vDSP, so a sum or a standard deviation across a large dataset is a vectorised pass on the machine in front of you — not a round-trip across a language boundary or a network.

It is the same engine that sits beneath Kiraa — the layer that lets her read your data and answer in plain English, on premise. The library is open source so the rest of the Swift world can build on it too.

[1.1]

Apple Silicon native.

Sum, mean, standard deviation, min and max run through Accelerate / vDSP as vectorised passes over columnar storage.

[1.2]

A two-tier CSV parser.

A fast byte-level path reads contiguous UTF-8 with zero String allocation for numeric columns, falling back to character-based parsing only where it must.

[1.3]

Typed and deterministic.

Column types are known at compile time, and the same query over the same data returns the same answer on every run.

[1.4]

Lazy pipelines.

Chain filter → select → groupBy → mean and let the query planner defer the work until you collect.

[1.5]

One binary, on premise.

Ship a single executable with no interpreter to bundle. Sensitive data never has to leave the machine — the same principle that runs Kiraa.

[02] Examples

A few lines, and you have your answer.

The calls below mirror the operations the demo benchmarks — the same ones you would write against your own data.

Read a CSV into a columnar DataFrame, then reach for the aggregations directly. Each one is a vectorised pass; none of them ask you to leave Swift.

For the exact method signatures, the repository is the source of truth.

Read the docs
aggregate.swift
import SwiftPandas

let df = try DataFrame.readCSV("employees.csv")

let total = df["salary"].sum()      // vDSP
let avg   = df["salary"].mean()
let band  = df.filter { $0["salary"] > 100_000 }
groupby.swift
// salaries grouped by department
let byDept = df
    .groupBy("department")
    .agg(.sum("salary"), .mean("salary"))

// deferred: filter -> select -> groupBy -> mean
let seniorAvg = df.lazy()
    .filter { $0["age"] >= 38 }
    .select("department", "salary")
    .groupBy("department")
    .mean()
    .collect()

// per-row deviation from the department mean
let withDev = df.deptMeanDeviation(on: "salary", by: "department")
[03] Demo

See it move — the demo app.

SwiftPandasDemo generates a synthetic employee dataset of up to one million rows, parses it, and times a suite of aggregations across macOS, iPhone, and iPad.

The demo builds a globally representative dataset — up to 126,720 unique name combinations across eight departments — using deterministic formulas rather than random draws, so every run is reproducible. It is open source under the Apache 2.0 licence.

[3.1]

Benchmark.

A three-phase pipeline — generate, parse, run — with live progress, timing nine aggregation and transformation operations against the parsed DataFrame.

[3.2]

Data.

The full dataset in a paginated view — a sortable multi-column table on macOS, card-style rows with department badges on iPhone and iPad, and CSV export through the system file exporter.

[3.3]

Charts.

Six interactive SwiftUI Charts — salary by department, headcount, an age histogram, a salary-versus-age scatter, the deviation distribution, and a min–max range per department.

[3.4]

CLI usage.

Worked command-line examples of the swiftpandas tool — inline aggregation, filter and sort pipelines, multi-step analytics, and JSON transform files, each with copy-to-clipboard.

requirements · swift 6 · macos 26 / ios 26 / ipados 26 · xcode 26 · apache 2.0

SwiftPandas is a Kiraa beta. The API is still settling, and we are actively looking for collaborators — open an issue, send a pull request, or get in touch through the repository.

[04] Benchmarks

The numbers, on 100,000 rows.

Nine operations, timed end to end against a parsed DataFrame. Shorter is faster — most run in microseconds.

csv parseone-time
28.31 ms
sum (salary)Accelerate / vDSP vectorised sum across all values
30 µs
mean (salary)vDSP sum and count for a column-wide average
20 µs
std dev (salary)Two-pass: mean, then squared-deviation sum
70 µs
min / max (salary)Single-pass scan over all values
20 µs
filter (salary > 100K)Boolean mask, then index-gather into a new DataFrame
460 µs
groupBy → sumFactorise departments, accumulate sums per group
1.30 ms
groupBy → meanFactorise, sum and count per group, divide
710 µs
lazy pipelineDeferred filter → select → groupBy → mean via the planner
720 µs
dept mean + deviationGroupBy mean, merge, subtract for a per-row deviation
5.21 ms

// measured wall-clock · 100,000 rows · figures vary by chip and build
// csv parse is the one-time read phase, shown separately from the nine operations

[05] Newsletter

Stay in the loop.

The Kiraa newsletter — releases, benchmark write-ups, and notes from building dataframes on Apple Silicon. No drip, no noise.

We write when there is something worth reading: a tagged release, a reproducible benchmark, a design decision behind the library or behind Kiraa herself.

One email when it matters. Leave anytime.

the kiraa newsletter · unsubscribe anytime

Ready to meet kiraa?

SwiftPandas is the open-source dataframe layer beneath Kiraa · kiraa.ai