dataframe_long.loc[:, 'X'] = dataframe_long.variable.apply(lambda x: rev_xs[x])