Suppose below is your xpath for specific row in the table
html/body/div[1]/section[2]/div[1]/section/aside/div[2]/aside/aside[2]/div[2]/div/div/div[1]/table/tbody/tr[1]/td[3]/a
in this case you want to change the row dynamically i.e. tr[1] to be changed to tr[2], tr[3] …and so on
You can declare int i=1 and use the same if want to increase/ decrease its value
xpath for the same will change
html/body/div[1]/section[2]/div[1]/section/aside/div[2]/aside/aside[2]/div[2]/div/div/div[1]/table/tbody/tr["+i+"]/td[3]/a