def get_index_names(df):
    """
    Get names from either single or multi-part index
    """

    if df.index.name is not None:
        df_index_names = [df.index.name]
    else:
        df_index_names = list(df.index.names)

    df_index_names = [x for x in df_index_names if x is not None]

    return df_index_names