3 ms·
> where every CSV file has two header rows sigh Why people always try to make it harder? Name,string;Qty,units;Weight,kg;Volume,m^3;Just for the sake of
by justsomehnguy 3y ago
> where every CSV file has two header rows
sigh
Why people always try to make it harder?
Name,string;Qty,units;Weight,kg;Volume,m^3;Just for the sake of it with spaces,string;No don't use comma in the header names - it doesn't make sense,string;
- readthenotes1 3y agoI think it has more to do with Excel properly recognizing the data type rather than humans doing so. It has been too long since I dealt with it to recall the troubles but I know there are things that should be easy that aren't since you can't tell Excel how to interpret the data.
- Kluggy 3y agoIn the fictional world where excel understands the second header row, it could just as easily understand a unit delimiter and units in a single header row. Either would make my day as a programmer though.
- 2nenaoki 3y agoSSV?
- bobbylarrybobby 3y agoWhy not do it the other way? Name;string,Qty;units so that if you just double click to open in excel, or use a naive reader that doesn't understand the format (which most won't), the column names are basically correct?
- cpeterso 3y agoThat’s a great idea and useful fallback behavior for file importers that don’t understand the type annotations. Stylistically, I suggest using a colon like many programming languages do for type annotations: Name:string,Qty:units
- secondcoming 3y ago> No don't use comma in the header names You just know that someone somewhere will do just that and you'll have to deal with it as best you can.
- candiddevmike 3y agoBut this will break all of my unquoted columns with semicolons in them!
- mjevans 3y agoEven a newline could be used per header to add a second 'line' that has the units. It makes sense to humans and computers could easily read that.