In my MySQL database, phone in a VARCHAR. Then, I import this to a pandas dataframe. Here's my data:
data5
id   phone
1     +62634783472
2       0834838483
3              +62
What I want is convert +62 to 0, expected output would be like this
id   phone
1       0634783472
2       0834838483
3                0
I already try two thing, there are
data5['phone'] = data5['phone'].str.replace('+62', '0')
data5['phone'] = data5['phone'].replace(to_replace='+62', value='0', regex=True)
And the result is:
error: nothing to repeat at position 0
What is I miss?
 
     
    