write_table_hdf5#

astropy.io.misc.hdf5.write_table_hdf5(table, output, path=None, compression=False, append=False, overwrite=False, serialize_meta=False, **create_dataset_kwargs)[source]#

Write a Table object to an HDF5 file.

This requires h5py to be installed.

Parameters:
tableTable

Data table that is to be written to file.

outputstr or h5py.File or h5py.Group

If a string, the filename to write the table to. If an h5py object, either the file or the group object to write the table to.

pathstr

The path to which to write the table inside the HDF5 file. This should be relative to the input file or group. If not specified, defaults to __astropy_table__.

compressionbool or str or int

Whether to compress the table inside the HDF5 file. If set to True, 'gzip' compression is used. If a string is specified, it should be one of 'gzip', 'szip', or 'lzf'. If an integer is specified (in the range 0-9), 'gzip' compression is used, and the integer denotes the compression level.

appendbool

Whether to append the table to an existing HDF5 file.

overwritebool

Whether to overwrite any existing file without warning. If append=True and overwrite=True then only the dataset will be replaced; the file/group will not be overwritten.

serialize_metabool

Whether to serialize rich table meta-data when writing the HDF5 file, in particular such data required to write and read back mixin columns like Time, SkyCoord, or Quantity to the file.

**create_dataset_kwargs

Additional keyword arguments are passed to h5py.File.create_dataset() or h5py.Group.create_dataset().