a=data["Col2"] a=a.dropna() a=pd.DataFrame(a) k=[] for i in data["Col1"]: k.append(i) o=1 for i in a.index: o=o+i k.insert(o,a['COLOR2'][i]) o+=1 But the problem here is the index of Col1 changes after 1st insertion. And after adding 1(o+=1), it still does not give the desired output.

DataFrame?