def subsampleData(adata, df):
    """Returns a full AnnData object containing only cells identified in findCellsByGeneCoex.
    
    Parameters
    ----------
    adata : AnnData object.
        The scanPy AnnData object results were originally extracted from.
    df : Pandas DataFrame.
        The result dataframe from findCellsByGeneCoex
        
    Example:
    >>> result = findCellsByGeneCoex(adata, 'Gad1', 'Sst', 0.6, gene1up=True, gene2up=True, use_raw=True)
    >>> adata=subsampleAdata(result,adata)

    """
    return(adata[adata.obs.index.isin(df.index.tolist())])