import numpy as np
import pandas as pd
df = pd.DataFrame({'A': [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2], 'B': [0, 0, 1,
    1, 1, 0, 1, 0, 1, 0, 0, 1], 'C': [34, 32, 35, 34, 31, 34, 29, 34, 12, 
    34, 32, 34], 'D': [11, 15, 22, 15, 9, 15, 11, 15, 14, 15, 13, 15]})
df.to_hdf('/tmp/out.h5', 'results_table', mode='w', data_columns=['A'],
    format='table')
read HDF5 file to pandas DataFrame with conditions