I want to replace string without using replace()
function.
Only want to use pandas
and numpy
.
sample data:
# df
Col1
ab1
de4
The logic of replace is:
a
will bei
b
will beg
d
will bem
e
will bet
1
will be2
4
will be3
Is there any way that I can create a dictionary and use this to identify and replace?
# df
Col1 Col2
ab1 ig2
de4 mt3