I am trying to generate a column that combines the values of three selected rows into a new column
col_1 col2 col3 col4 col5 key_column
Nivea care 300 SSL pre-ssl NIVEACARE300SSL
Balea milk 800 SSL+ pre-ssl+ BALEAMILK800SSL+
So, the key_column should contain values from col1,col2,col3 and col4
I am generating this column so that I can merge this data frame to another data frame where values are something like this
col_1 col2 col3 col4 Solution key_column
nivea nivea care era 300ml SSL 1500€ NIVEANIVEACAREERA300MLSSL
balea balea milk arc 800ml SSL+ 1540€ BALEABALEAMILKARC800MLSSL+
- Can anyone help me in generating key_column?
- Is there a way where I can merge these two data frames which are almost similar and has similar values at a random position? Because I have very diversed dataframe and it is difficult to change the row values comparing and looping through the data frame to perform left join to obtain the Solution column.
PS: My intention for key_column generation was to perform fuzzy matching. But I am worried about accuracy. Because I have to extract the price and it should be accurate. Any other approach or suggestions would be helpful.