Python Loop Through Dataframe And Change Values In R