def maybe_append(df1, df2):
    """
    If both data frames are available, append them and return. Otherwise, return
    whichever frame is not None.
    """
    if df1 is None:
        return df2
    if df2 is None:
        return df1
    return df1.append(df2)