10-minute Quickstart
This quickstart walks through install → model parsing → safe editing → dataset conversion.
1) Install
Follow Install.
2) Parse messy input into a typed model
╭──────────────────╮
│ Model[list[int]] │
│ │
│ [101, 102, 103] │
╰──────────────────╯
3) Safe interactive manipulation
>>> try:
... readings.append('invalid')
... except Exception as err:
... print(type(err).__name__)
>>> readings
ValidationError
╭──────────────────╮
│ Model[list[int]] │
│ │
│ [101, 102, 103] │
╰──────────────────╯
4) Build a Dataset and batch-parse values
╭───┬────────────────┬────────────┬────────┬──────────────────╮
│ # │ Data file name │ Type │ Length │ Size (in memory) │
│ │ │ │ │ │
│ 0 │ sample_a │ Model[int] │ - │ 589 Bytes │
│ 1 │ sample_b │ Model[int] │ - │ 589 Bytes │
│ 2 │ sample_c │ Model[int] │ - │ 589 Bytes │
╰───┴────────────────┴────────────┴────────┴──────────────────╯
5) Convert nested records to pandas-ready tables
>>> records = om.JsonListOfDictsDataset({'rows': [{'id': 'a', 'value': '1'}, {'id': 'b', 'value': 2}]})
>>> records
>>> records_pd = records.to(om.PandasDataset)
>>> records_pd
╭───┬────────────────┬─────────────┬────────┬──────────────────╮
│ # │ Data file name │ Type │ Length │ Size (in memory) │
│ │ │ │ │ │
│ 0 │ rows │ PandasModel │ 2 │ 9.5 kB │
╰───┴────────────────┴─────────────┴────────┴──────────────────╯