I have data in excel and want to modify one column:
Desired output:
Name Design Category Rank DUT UIK Group2 5 HYT TYAHU Group1 1 PAT JKAL Group1 2 JKL PLK Group3 3I want to modify column 2 (Design) from row 3 & add to each row ":POJK:WAT"
Desired output:
Name Design Category Rank DUT UIK Group2 5 HYT TYAHU:POJK:WAT Group1 1 PAT JKAL:POJK:WAT Group1 2 JKL PLK:POJK:WAT Group3 3I use below code:
df['Design']=df['Design'].astype(str)+[':POJK:WAT'] df['Design']=df['Design'].str.replace('UIK:POJK:WAT','UIK') % to replace in 2nd row ":POJK:WAT"