pub fn samples_dataframe(samples: &[Sample]) -> Result<DataFrame, Error>Expand description
Create a DataFrame from a slice of samples with the 2026.04 schema.
Each annotation in each sample becomes one row. Columns where every value
is null are automatically dropped, so the result only contains columns
that carry data. The name column is always present.
§Schema (2026.04)
name: Sample name (String) - ALWAYS PRESENTframe: Frame number (UInt32)object_id: Object tracking ID (String)label: Object label (Categorical)label_index: Label index (UInt64)group: Dataset group (Categorical)polygon: Segmentation polygon rings (List<List>) box2d: 2D bounding box [cx, cy, w, h] (Array<Float32, 4>)box3d: 3D bounding box [x, y, z, w, h, l] (Array<Float32, 6>)mask: PNG-encoded raster mask (Binary)box2d_score: Box2d confidence (Float32)box3d_score: Box3d confidence (Float32)polygon_score: Polygon confidence (Float32)mask_score: Mask confidence (Float32)size: Image size [width, height] (Array<UInt32, 2>)location: GPS [lat, lon] (Array<Float32, 2>)pose: IMU [yaw, pitch, roll] (Array<Float32, 3>)degradation: Image degradation (String)iscrowd: COCO crowd flag (Boolean)category_frequency: LVIS frequency group (Categorical)neg_label_indices: Verified-absent label indices (List) not_exhaustive_label_indices: Incomplete label indices (List) timing: Pipeline timing (Struct{load, preprocess, inference, decode} of Int64)
§Example
use edgefirst_client::{Client, samples_dataframe};
let samples = client
.samples(dataset_id, Some(annotation_set_id), &[], &[], &[], None)
.await?;
let df = samples_dataframe(&samples)?;
println!("DataFrame shape: {:?}", df.shape());