0

How can I write a loop to replace all values in a pandas column "x" that are 3 to 4? I tried:

for i in df['x']:   
  if i == 3:  
     i = 4   
  else:  
     i = i
user10939484
  • 167
  • 2
  • 13

0 Answers0