Skip to content
quartiledocsv0.1
GitHub

Dataframe and notebook handoff

PreviewPython exampleFile snapshot

Export a deliberate pandas or Polars snapshot into a browser workspace with explicit types and import bounds.

Export from your existing environment

The standard-library Python helper accepts pandas/Polars dataframes or lists of row dictionaries. Copy quartile_snapshot.py beside your script or notebook (or add its directory to your Python import path), then choose an intentional subset; it never truncates silently. The accompanying executable notebook demonstrates pandas in your own environment.

from quartile_snapshot import write_snapshot

write_snapshot(df.head(1000), "observations.json",
    label="Experiment observations",
    fields={
        "sample_id": {"type": "nominal", "label": "Sample"},
        "temperature": {"type": "quantitative", "unit": "°C"},
    })

The utility has no third-party dependency. Install pandas or Polars in the environment that owns your dataframe. Quartile has no Python package, notebook kernel or two-way notebook state bridge.

Import and inspect

Open the dataset explorer and choose Import CSV or JSON. JSON may contain a row array or the helper's metadata envelope. The example adapts that envelope to a Quartile Dataset; the envelope itself is not a Dataset API.

A hosted snapshot can also be loaded through Load from a data URL; see URL loading and failure behavior. This remains a snapshot, not notebook synchronization.

The example accepts a nonempty dataset with up to 10,000 rows, 64 fields and 5,000,000 bytes. These are explicit input guards, not a universal performance promise. Records remain in the browser; saving a view stores configuration, not the imported dataset. A connected assistant sends only its configured, inspectable context when requested.

Keep an ID as an ordinary column: a dataframe index does not automatically become record identity. Label date-looking or numeric-looking IDs as nominal and confirm inferred types before analysis.

Preserve values deliberately

The helper preserves booleans, finite numbers and strings, converts dates to ISO strings, and normalizes missing/nonfinite values to null. Nested cells reject. Integers outside JavaScript's safe range reject; convert identifiers to strings deliberately. JSON cannot preserve arbitrary dataframe extension types or precision by itself.

For Arrow IPC, use Arrow and worker queries. Convert dataframe integer widths, timestamp precision and string representation to the adapter's supported physical types. The current adapter rejects 64-bit integers, decimals, nested fields and sub-millisecond timestamps.

Jupyter and Streamlit can host separate custom frontend integrations, but Quartile does not ship a widget or Streamlit component. The delivered integration is the tested snapshot helper plus file and URL loading in the example.
Report an issueBuilt Oct 21, 2026