blaze / datashape

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

Datashape uniting within nested records #94

Closed mrocklin closed 10 years ago

mrocklin commented 10 years ago

This extends datashape uniting (e.g. int + float -> float) within nested records.

In [1]: from datashape import discover

In [2]: discover([{'name': 'Alice', 'rec': {'a': 1, 'b': 1.0}, 'amount': 100}, 
                  {'name': 'Bob', 'rec': {'a': 1, 'b': 2}}])
Out[2]: dshape("2 * { amount : ?int64, name : string, rec : { a : int64, b : float64 } }")