write_dataframe
- lstchain.io.io.write_dataframe(dataframe, outfile, table_path, mode='a', index=False, config=None, meta=None, filters=Filters(complevel=1, complib='blosc:zstd', shuffle=True, bitshuffle=False, fletcher32=True, least_significant_digit=None))
Write a pandas dataframe to a HDF5 file using pytables formatting.
- Parameters:
- dataframepandas.DataFrame
The dataframe to be written to the HDF5 file.
- outfilestr
The path to the output HDF5 file.
- table_pathstr
The path to the table to write in the HDF5 file.
- mode: str
If given a path for
h5file
, it will be opened in this mode. See the docs oftables.open_file
.- indexbool, optional
Whether to include the index of the dataframe in the output. Default is False.
- configdict, optional
Configuration metadata to be stored as an attribute of the output table. Default is None.
- metalstchain.io.lstcontainers.MetaData, optional
Global metadata to be stored as attributes of the output table. Default is None.
- filterstables.Filters, optional
Filters to apply when writing the output table. Default is tables.Filters(complevel=1, complib=’zstd’, shuffle=True).
- Returns:
- None