adding row names to dataframe encodings