I would like to create a column that generates a unique id that is matched with two of my columns in my data frame.
Here is below is the example dataframe:
df = pd.DataFrame({'month': [1, 2, 1, 3,4,5], 'brand': [76, 76, Arco, Shell, Arco, Cheveron],'address': [aa, aa, ab, bc, cd,de]})
I want a index that matches both the brand and address but not the month
df = pd.DataFrame({ 'id':[1,1,2,3,4,5] 'month': [1, 2, 1, 3,4,5], 'brand': [76, 76, Arco, Shell, Arco, Cheveron],'address': [aa, aa, ab, bc, cd,de]})