def prepare_as_panel(df, stock_name):
    """
    Auxiliary function for converting a dataframe with correlation values into a DataPanel
    :param df:
    :param stock_name:
    :return:
    """
    df['stock'] = stock_name
    return df.reset_index().set_index(['stock', 'Date']).to_panel()