Live data from Hacker News

Why isn’t there a decent file format for tabular data?

successfulsoftware.net

31–40 of 355 posts

Re: Why isn’t there a decent file format for tabular data?

#31

if you are ok with a binary format there is apache parquet or apache feather or 'jay' ( https://datatable.readthedocs.io/en/latest/api/frame/to_jay.... ).

No doubt binary formats like Parquet are the way to go for high performance with multi-GB datasets. Seems like total overkill if you have a few hundred or thousand rows of data though. Being able to create/edit/view stuff in a text editor and easily version it is very useful.

Re: Why isn’t there a decent file format for tabular data?

#32

I don't think anyone wants tabular data. They want to ingest it into a system so they can query it, or join it, or aggregate it. They want to get rid of tabular data as quickly as possible Data at the boundary must be validated, a file format can't do that for your. Semantics is harder than syntax and you can't push every problem to that level.

It's tables all the way down...

Re: Why isn’t there a decent file format for tabular data?

#33
post #26

> 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…

it will also be at least 2x bigger on disk for no reason.

Your data must be very sparse or include a lot of escape chars for that.

I've seen a lot of CSV where everything is quoted, meaning that the cell separator is effectively

    ","
which is only one character less than

    
and still beats the pants off of JSON or XML. imho, it would be a good compromise, in that there's already partial tooling and GUI support.

Re: Why isn’t there a decent file format for tabular data?

#35

The proposed format is reasonably same, but you really want to prevent people from writing them by hand, and adding a bit of metadata to describe the column data types at a minimum, and ideally more information such as allowed values, semantics, etc. To that end, I suggest that putting the tabular data file, along with a metadata descriptor file, inside an archive format (zip, tarball, etc.); that would put just the…

Being able to create small tabular datasets by hand is incredibly useful to me (doing support for data wrangling software).

Having an optional associated meta data file would be useful though.

Re: Why isn’t there a decent file format for tabular data?

#36

I never understood why the ASCII separator characters aren't used more. It seems like we're one simple text editor feature away from having easy display and modification. Is there some historical reason for not doing that?

ASCII separators (mnemonics FS, GS, RS, US) are difficult for most users to type, and have no obvious/standardized visual representation.

Re: Why isn’t there a decent file format for tabular data?

#38
I think it’s because csv is good enough.

All the standards I’ve seen haven’t been worth the effort to implement. So since csv, with all its flaws, is good enough it crowds out other open standards.

People complain about it, but it’s not really much of a challenge to use csv. I’d also prefer it over the crap (rdf, xml, even schemad json) proposed by people who value more structure. It’s easier for me to just make clean production and consumption programs than to spend time on a really structured table format.

Although I would love a simple, tabular format so I’d never have to use csv again.

Re: Why isn’t there a decent file format for tabular data?

#39
post #2

HDF5 is often used in scientific computing for this. https://en.wikipedia.org/wiki/Hierarchical_Data_Format

> This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file can be accessed using the POSIX-like syntax /path/to/resource. That seems a whole higher level of complexity compared to CSV or the other options listed in TFA (perhaps comparable to Excel).

NetCDF4 (built on top of HDF5 largely through sub-setting) is considerably more powerful than excel/libreoffice. Its also easy to access through widely-available libraries. I frequently use the Python `netCDF4` (yes, it really is capitalized that way) library for exploratory work.

Re: Why isn’t there a decent file format for tabular data?

#40
post #38

I think it’s because csv is good enough. All the standards I’ve seen haven’t been worth the effort to implement. So since csv, with all its flaws, is good enough it crowds out other open standards. People complain about it, but it’s not really much of a challenge to use csv. I’d also prefer it over the crap (rdf, xml, even schemad json) proposed by people who value more structure. It’s easier for me to just make clea…

I think CSV is crappy because commas are so common in real data.

For almost all scenarios I've had to work with, I'd have been perfectly happy with TSV where literal Tab was a disallowed character. No escaping histrionics required.

Post reply on HN