title: How should I use the h5py library for storing time series data?
body: <p>I have some time series data that i previously stored as hdf5 files using <code>pytables</code>. I recently tried storing the same with <code>h5py</code> lib. However, since all elements of <code>numpy</code> array have to be of same dtype, I have to convert the date (which is usually the index) into '<code>float64</code>' type before storing it using <code>h5py</code> lib. <strong>When I use <code>pytables</code>, the index and its dtype are preserved which makes it possible for me to query the time-series without the need of pulling it all in the memory. I guess with <code>h5py</code> that is not possible. am I missing something here?</strong> And if not, under what situations should i use <code>h5py</code> lib to store time series data? I ask this question cause, clarity on this could help me design a more efficient (processing &amp; storage wise) project.</p>
  
  <p>below is simple code, where I have to lose index information in order to store it as a single dtype object</p>
  
  <pre><code>dt_range = pd.date_range('2016-12-01','2016-12-10')
  data = np.arange(0,20).reshape(-1,2)
  df = pd.DataFrame(data,index = dt_range, columns = list('ab'), dtype = 'float')
  df.index  = df.index.to_julian_date()
  df = df.reset_index()
  h = h5py.File(r'path\temp.h5', 'w')
  dset = h.create_dataset('temp',data = df.values, shape = (10,3))
  </code></pre>