3 ms·
If I understand the API correctly from my brief glance, the crate returns a triply-nested vector with the outermost vector being the equivalent of CSV rows, the
by michaelmior 3y ago
If I understand the API correctly from my brief glance, the crate returns a triply-nested vector with the outermost vector being the equivalent of CSV rows, then CSV columns, then "units" which don't have a direct CSV equivalent. It would be helpful if there was an API method that returned results without this final level of nesting, perhaps panicking if there is more than one unit. This would make it easier to deal with the common case (in CSV at least) where each column only has a single value.
- hiccuphippo 3y agoI think the units are the csv fields, records are rows, groups would be multiple CSV files (or multiple sheets in an excel file) and file separator... a zip with multiple CSV files? (or multiple excel files).
- michaelmior 3y agoMy mistake then about the correspondence :)
- somishere 3y agoI'm interested in this too. IMO there's actually a huge benefit to being able to concisely represent 3D / 4D data (i.e. xarrays, slices, datasets) in an easily digestible text format. Mainly thinking about this approach over e.g. the netCDF format or deeply nested JSON.
- jph 3y agoYou're directionally correct. :-) USV terminology is units, records, groups, files. Spreadsheet equivalents are cells, lines, sheets, folios. Database equivalents are fields, rows, tables, schemas. The USV Rust crate provides iterators str.units(), str.records(), str.groups(), str.files(), so it's easy to get the parts you want.