Having a data frame as below:
data = {'number':[4,3,3,3,3,3,3,3,3,3,4,5],'name':['L6','L6','L6','L6','L6','L8','L8','L8','L9','L9','L8','L9'],
'product1':['B','C','A','A','A','A','B','B','D','D','D','E'],
'product2':['D','A','B','Z','C','G','G','T','E','W','T','Q']}
df = pd.DataFrame(data)
df
Needs to replace all the rows or reindex the rows at the begining of the dataframe based on a list.
lst = [(3,'L6','A'),(3,'L8','B'),(3,'L9','D')]
The below figure shows the expected output:
