I have this code that replaces a string for another string and I'm wondering if there's an easier way to do this. Instead of doing the .replace for each one, I want to just read a column and replace it with the column next to it instead of writing out .replace.
text = open('thecode.csv','r')
text = ''.join([i for i in text]) \
.replace('Salam', 'Hello') \
.replace('somebody', 'anybody') \
How can I go about this quicker if I have two columns that look like this:
Column1 Column2
Salam Hello
somebody anybody