I have two dataframes :
Event
| Event |
|---|
| AA |
| AB |
| AC |
| AE |
| AC |
| AA |
| AB |
| AC |
| AD |
| AD |
| AA |
Unique_values_event
| Event | Factor |
|---|---|
| AA | 1 |
| AB | 2 |
| AC | 3 |
| AD | 4 |
| AE | 5 |
Where event is a column of events name and unique_values_event is the unique values of that column and a factor column with randomly atributed unique factor numbers.
My goal is to in the Event column, search for that value in unique_values_event df and atributed it his previously atributed factor number.
Does anyone has a way ?
Best regards