Create HDF5 Group /Table if it does not exist
<p>I am building an HDF5 file using PyTables python package. The file would be updated everyday with latest tick data. I want to create two groups - <code>Quotes</code> and <code>Trades</code> and tables for different futures expiries.  I want to check if the group <code>Quotes</code> exists or not and if not then create it. What is the best way to do it in PyTables?</p>

<p>Here is a code snippet of where I am right now:</p>

<pre><code>hdf_repos_filters = tables.Filters(complevel=1, complib='zlib')
for instrument in instruments:
    if options.verbose:
    hdf_file = os.path.join(dest_path, "{}.h5".format(instrument))
    store = tables.open_file(hdf_file, mode='a', filters=hdf_repos_filters)
    # This is where I want to check whether the group "Quotes" and "Trades" exist and if not create it
</code></pre>