blaze / datashape

Language defining a data description protocol
BSD 2-Clause "Simplified" License
183 stars 65 forks source link

Use list of lists to construct Records in dshape #48

Closed mrocklin closed 9 years ago

mrocklin commented 10 years ago

We should support construction of all datashapes through python syntax and data structures. This allows for simpler programmatic construction than string manipulation.

One case where this is difficult is records, e.g.

'{name: string, amount: int}'

In datashape the order matters while in Python the order doesn't

{'name': string, 'amount': int} == {'amount': int, 'name': string}

The standard fallback is to use a sequence of items

[['name', string], ['amount', 'int']]

Maybe the utility function dshape should recognize this situation and produce the appropriate Record

cpcloud commented 9 years ago

closing in favor of #71