def get_ngram_plot_data(df, type, sentiment):
    """Format the data to the ngram plot

    Parameters
    ----------
    df: Pandas DataFrame
        Pandas dataframe with the ngrams sentiment data
    type: String
        Type of the ngram to filter
    sentiment: String
        POSITIVE or NEGATIVE

    Returns
    -------
    Pandas Dataframe
        The dataframe filtered
    """
    return df.query("type == @type and sentiment == @sentiment").sort_values('score', ascending=False)