Cognoxium for pandas users¶
CognitionFrame borrows pandas’ composable, tabular style, but its rows are not arbitrary business data. Every row represents one unit of AI context with provenance, trust, retention, and lineage.
A practical mapping¶
pandas idea |
Cognoxium equivalent |
Important difference |
|---|---|---|
|
|
Immutable plan over |
Boolean mask |
|
Expressions operate on context fields |
|
|
AI operations still require |
|
|
|
|
|
Canonical payload hash plus conservative lineage merge |
|
|
0.1-series aggregation is for tabular exploration and evaluates immediately |
|
|
Preserves the typed context schema |
I/O methods |
JSONL, Arrow IPC, Parquet |
Arrow/Parquet require the |
Familiar operations¶
import cognoxium as cx
frame = cx.CognitionFrame.from_records([
{"id": "a", "payload": "Rust tokenizer", "priority": 2,
"sources": ["app://a"], "created_at": "2026-01-01T00:00:00Z"},
{"id": "b", "payload": "Python fallback", "priority": 1,
"sources": ["app://b"], "created_at": "2026-01-01T00:01:00Z"},
])
active = frame.filter(cx.col("priority") >= 2).sort("priority", descending=True)
print([item.id for item in active.collect()])
print(active.explain())
['a']
Scan[context records] -> Filter -> Sort[priority]
Deliberate differences from pandas¶
There is no in-place mutation. Every transformation returns a new frame.
rank()is notsort(): ranking affects budget allocation, while selected output retains original order.requiredis a contract. Packing never silently drops or demotes it.select()can produce an exploratory table withoutidorpayload;collect(),dedupe(),rank(), andpack()then raiseSchemaError. Usecollect_records()for such tables.GroupedCognitionFrame.agg()is eager in the 0.1 series even though ordinary frame plans are lazy.Cognoxium is not a pandas replacement and does not implement generic indexing, statistical analysis, or arbitrary I/O formats.
The stable user-facing namespace is the set of names exported from cognoxium. Underscore-prefixed metadata such as _rank_score and _cognoxium_dedupe is an implementation detail; use PackManifest for durable audit records.