def writePattern(df, pat):
    """
    utility function to append a pattern in a dataframe

    Parameters
    ----------
    df : pandas dataframe
        input dataframe to be updated
    pat : src.Patterns.pattern
        pattern to be added

    Returns
    -------
    pandas dataframe
        updated dataframe
    """
    df = df.append(pat.getDictForm(), ignore_index=True)
    return df