def flip_dataframe(df, new_colname='index'):
    """Flips table such that first row becomes columns
    
    Args: 
        df (DataFrame): Data frame to be flipped.
        new_colname (str): Name of new column. Defaults to 'index'.
    
    Returns: 
        DataFrame: flipped data frame.
    """
    colnames = [new_colname] + df.iloc[:, 0].tolist()
    df = df.T.reset_index()
    df.columns = colnames
    df = df.iloc[1:, :]
    return df