Seems like the problem here is there is several high quality and well-developed formats, but the author and the commenters here dismiss them because of the different trade-offs they make. csv -- Simple for simple use cases, text-based, however many edge cases, feature lacking etc xlsx -- Works in excel, ubiquitous format with a standard, however complicated and missing scientific features sqlite -- Designed for relat…
The DBT (DBase III) format was common in the 80s and 90s. It is a typed, fixed-width format that was directly supported by Excel, Visual Basic grid widgets, among many other tools. For example, Norton Commander supported it directly, letting you preview database tables without loading another program.
Why isn’t there a decent file format for tabular data?
221–230 of 355 posts
Re: Why isn’t there a decent file format for tabular data?
#222Earlier quoted context omitted.
Code may be data but data isn't code.
Data is code that prints/evaluates to itself.
Re: Why isn’t there a decent file format for tabular data?
#223Seems like the problem here is there is several high quality and well-developed formats, but the author and the commenters here dismiss them because of the different trade-offs they make. csv -- Simple for simple use cases, text-based, however many edge cases, feature lacking etc xlsx -- Works in excel, ubiquitous format with a standard, however complicated and missing scientific features sqlite -- Designed for relat…
JSON also has its own advantages and disadvantages.
Of course, both of these formats are more structured than CSV, but XML is also a more structured format.
(And, like I and others have mentioned too, the format that they dsecribed isn't actually unique; it just doesn't seem to be that common, but there are enough people who had done the same thing independently, and a few programs which support it, that you could use it if you want to do, and it should work OK.)
Re: Why isn’t there a decent file format for tabular data?
#224Re: Why isn’t there a decent file format for tabular data?
#225Earlier quoted context omitted.
I prefer commas because I can see them over tabs. I spend zero time escaping commas because the libraries and read and write with (usually pandas but pretty much everything) escape for me. So unless I’m manually building csvs myself it’s a non-issue and certainly not histrionics.
I prefer tabs because my data can often have commas in it. Seeing tabs isn’t an issue as I also have invisible characters visible in all of my editors. But having your delimiter not be allowed in the record (as in \t is disallowed), makes parsing so much easier. CSV is a bear to parse because you have to read each value from a buffer to handle the quoting. line.strip().split(‘\t’) Is so handy. Batteries included are…
You really do want to use a library to parse CSV since there are a number of corner cases. For example, your example code may not read a whole row since rows can have newlines in them.
Re: Why isn’t there a decent file format for tabular data?
#226> Why can’t we have a format where Does Excel support it? No? Then that's the end of that. Excel is tabular data to all non developers. The formats supported by Excel are the whole thing. And if we're inventing a CSV-like format that uses a more convenient character than quotes and commas, maybe jumping to a non-displayable non-typeable character isn't the best? Honestly, if I were inventing a table format, I'd use a…
(I had considered ; my reason was that it seems to work better with user CSS, and might be simpler to parse in other cases too.)
Re: Why isn’t there a decent file format for tabular data?
#2272. Or you don’t and you’re much better off with any binary format.
Why aren’t unicode separators keys on your keyboard? Maybe that’s suboptimal, but good luck changing that.
Re: Why isn’t there a decent file format for tabular data?
#228I literally don't get why JSON is bad: [{row1}, {row2}, {row3}] The fact that it can do more is in no way a negative. Can even make a limited JSON parser with reduced capabilities. And with JSON can do more definitions like header names vs column names vs just arrays of arrays.
json is absolutely horrid for this type of hack-in jobs. Tabular data just not well structure data, easy to cut and paste.
Re: Why isn’t there a decent file format for tabular data?
#229Earlier quoted context omitted.
The DBT (DBase III) format was common in the 80s and 90s. It is a typed, fixed-width format that was directly supported by Excel, Visual Basic grid widgets, among many other tools. For example, Norton Commander supported it directly, letting you preview database tables without loading another program.
Do you have the file format documentation?
Re: Why isn’t there a decent file format for tabular data?
#230Earlier quoted context omitted.
> but not the lack of a date type. i've also found this to be truly bizarre. even more bizarre than not actually respecting (via coercing or error) to the specified type...why even have types, then?
What's so special about having a named type for datetime? User will still need to call functions to manipulate the dates. If only for the default display and import?
That's a mistake that the same bad developer couldn't have done with a PostgreSQL or a MySQL.