# Best practices with HDF5 and Datasets

I work with colleagues who rely on HDF5 as their data interchange format (largely exported from Python's Pandas).

Of course we have Import[] available for getting this data in, but I would like to work with it in the Dataset[] idiom. I was disappointed to see that SemanticImport[] doesn't do the job I'd expect here. (You'd sort of hope / expect that importing a "Dataset" would, well, map to a Dataset, but such are the ways of WRI).

I know I can 'assemble' the Dataset from the HDF5 in a straight-forward way, but was just wondering if anyone had already done the 'heavy lifting' here.

• In this answer I have a section on HDF5, which is based on Import / Export. This may not be entirely what you are after, but might still be useful. The code I gave there converts between HDF and a tabular list structure, but I also provided functions tableToDataset and datasetToTable which you can use to convert between Dataset and HDF5, so you will have to use tableToDataset @* hdf5ToTable and datasetToTable @* tableToHDF5. – Leonid Shifrin Sep 25 '15 at 16:45
• @LeonidShifrin Beautiful, I will have a look. Your code is seemingly always useful. – flip Sep 25 '15 at 16:51
• A followup to the above, in case someone comes looking - Lots of the data I'm getting has so-called Compound data. Mathematica (still) doesn't play nice with compound data, and a few of the custom-whipped MathLink (now called something else) solutions don't seem to like what I have either. So, for now, if you're exchanging Compound data, beware. – flip Oct 1 '15 at 17:55