def convert_site_dm3_table_directions(sites_df):
    """
    Convert MagIC site headers to short/readable
    headers for a figure (used by ipmag.sites_extract)
    Directional table only.

    Parameters
    ----------
    sites_df : pandas DataFrame
        sites information

    Returns
    ---------
    dir_df : pandas DataFrame
        directional site data with easily readable headers
    """
    dir_df = sites_df.copy().dropna(subset=['dir_dec', 'dir_inc'])
    DirCols = ['Site', 'TC (%)', 'Dec.', 'Inc.', 'N', 'k    ', 'R', 'a95',
        'VGP Lat', 'VGP Long']
    columns = ['site', 'dir_tilt_correction', 'dir_dec', 'dir_inc',
        'dir_n_samples', 'dir_k', 'dir_r', 'dir_alpha95', 'vgp_lat', 'vgp_lon']
    dm3_to_readable = dict(zip(columns, DirCols))
    if len(dir_df) > 0:
        for col in ['dir_n_samples', 'dir_tilt_correction']:
            if col in dir_df.columns:
                dir_df[col] = dir_df[col].values.astype('int')
        columns = dir_df.columns.intersection(columns)
        has_vgps = False
        if 'vgp_lat' in dir_df.columns:
            test_vgp = dir_df.dropna(subset=['vgp_lat', 'vgp_lon'])
            if len(test_vgp) > 0:
                has_vgps = True
        if has_vgps:
            dir_df['vgp_lat_abs'] = dir_df.vgp_lat.abs()
            dir_df.sort_values(by=['site', 'vgp_lat_abs'], ascending=False,
                inplace=True)
            dir_df = dir_df[columns]
            dir_df.drop_duplicates(subset=['dir_dec', 'dir_inc', 'site'],
                inplace=True)
        else:
            dir_df.drop_duplicates(subset=['dir_dec', 'dir_inc', 'site'],
                inplace=True)
            dir_df = dir_df[['site', 'dir_tilt_correction', 'dir_dec',
                'dir_inc', 'dir_n_samples', 'dir_k', 'dir_r', 'dir_alpha95']]
        dir_df.rename(dm3_to_readable, axis='columns', inplace=True)
        dir_df.sort_values(by=['Site'], inplace=True, ascending=True)
        new_cols = list(dir_df.columns.drop('Site'))
        dir_df = dir_df[['Site'] + new_cols]
    return dir_df
