I've a sample dataframe
id city
1 Florida
2 Atlanta
3 Manhattan
4 Amsterdam
5 Newyork
I've a function
def my_function(x):
y = x[::-1]
return y
How can I make a for loop that uses city column and inserts the reversed string in a column one by one which results the below?
id city reversed_string
1 Florida adirolF
2 Atlanta atnaltA
3 Manhattan nattahnaM
4 Amsterdam madretsmA
5 Newyork kroyweN