How to save a Pandas DataFrame in HDF5 format
• 1 minSometimes, you will need to save a DataFrame in HDF5 format, either to share it or store it.
Here is how to save a DataFrame in HDF5 format.
A few options are utilized here, the key and the mode, the key represents an identifier you are passing to the file when it is stored. (e.g. here "df" )
The mode is here to specify what Python should do with the file. A bit like the open() method when you deal with a text file. (e.g. here "w" because we are writing the file)
Here you are! You now know how to save a DataFrame in HDF5 format!
More on DataFrames
If you want to know more about DataFrame and Pandas. Check out the other articles I wrote on the topic, just here :