Conversions with .to()
Maturity labels
- Now: Stable and supported in current releases.
- Preview: Usable today, but behavior and APIs may evolve.
- Planned: Not yet implemented.
Note
Status: Now
Convert dataset types
>>> import omnipy as om
>>> records = om.JsonListOfDictsDataset({'rows': [{'id': 'a', 'value': '1'}, {'id': 'b', 'value': 2}]})
>>> records.to(om.PandasDataset).json()
Convert model types
>>> import omnipy as om
>>> table = om.JsonListOfDictsModel([{'id': 'a', 'x': 1}, {'id': 'b', 'x': 3}])
>>> table.to(om.PandasModel)
Chaining conversions
Prefer explicit checkpoints:
.json()to inspect shape.to(Target)to convert.json()again to confirm
Links
- Feature: Declarative conversions