Skip to content

Instantly share code, notes, and snippets.

@gansanay
Last active June 26, 2023 12:25
Show Gist options
  • Save gansanay/4514ec731da1a40d8811a2b3c313f836 to your computer and use it in GitHub Desktop.
Save gansanay/4514ec731da1a40d8811a2b3c313f836 to your computer and use it in GitHub Desktop.
Compare HDF5 and Feather performance (speed, file size) for storing / reading pandas dataframes
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@julius-datajunkie
Copy link

Loved this analysis, have been wondering which format is better to use as well.

@likenneth
Copy link

Yeah, thank you so much for providing evidence for my choosing feather, though the data may be slightly different.

@gaciap
Copy link

gaciap commented Aug 14, 2019

Thank you for such a great example of the methodical approach to the problem.
You pretty much did not leave any space for doubts.
I love it as a Scientist and as an Engineer. Thank you.

@fabiangunzinger
Copy link

This is great, thanks!

@sambitmishra98
Copy link

Great explanation to exactly what I needed!

Q: Why is HDF5 so popular when Feather seems to be doing an amazing job? Is there any instance where we are better off choosing HDF5 over Feather?

@osjatest
Copy link

Would be great if author can extend benchmark using compression for hdf5 format. I'm looking for the best data format to store huge number of data divided on files with ~3000 data rows in each. But since I need to store huge number of such files, I have to trade-off between speed and size. In that sense, compression is important parameter for me and I'm interested to compare compressed hdf5 and feather.

@abalhomaid
Copy link

Very clear and concise comparison. Many thanks for doing this!

@Davidmenamm
Copy link

Good analysis, thanks!

@fizban99
Copy link

As of 2022, to_feather compresses data by default with lz4. Using hdf5 with blosc:lz4 complevel 5 reaches a similar compression ratio. If you add strings into the mix, the superiority of feather is not that clear with big dataframes, specially in reading times. See modified version at https://github.com/fizban99/hdf_vs_feather/blob/main/hdf_vs_feather.ipynb

@Qoo0607
Copy link

Qoo0607 commented Aug 13, 2022

Great analysis, thanks for your sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment