code: def parse_data_df(data_dset, ridx, cidx, row_meta, col_meta):
      
      if len(ridx) == len(row_meta.index) and len(cidx) == len(col_meta.index):  # no subset
          data_array = np.empty(data_dset.shape, dtype=np.float32)
          data_dset.read_direct(data_array)
          data_array = data_array.transpose()
      elif len(ridx) <= len(cidx):
          first_subset = data_dset[:, ridx].astype(np.float32)
          data_array = first_subset[cidx, :].transpose()
      elif len(cidx) < len(ridx):
          first_subset = data_dset[cidx, :].astype(np.float32)
          data_array = first_subset[:, ridx].transpose()
      # make DataFrame instance
      data_df = pd.DataFrame(data_array, index=row_meta.index[ridx], columns=col_meta.index[cidx])
      return data_df
docs: Parses in data_df from hdf5, subsetting if specified.
  
      Input:
          -data_dset (h5py dset): HDF5 dataset from which to read data_df
          -ridx (list): list of indexes to subset from data_df
              (may be all of them if no subsetting)
          -cidx (list): list of indexes to subset from data_df
              (may be all of them if no subsetting)
          -row_meta (pandas DataFrame): the parsed in row metadata
          -col_meta (pandas DataFrame): the parsed in col metadata