def has_data(group, dataset_name):
    """Check whether HDF5 group contains a non-empty dataset with given name.

    Parameters
    ----------
    group : :class:`h5py.Group` object
        HDF5 group to query
    dataset_name : string
        Name of HDF5 dataset to query

    Returns
    -------
    has_data : {True, False}
        True if dataset exists in group and is non-empty

    """
    return dataset_name in group and group[dataset_name].shape != ()