I have a dataframe and alot of the values in one of the columns have python-unfriendly characters, like &.
I wanted to make a dictionary and then loop through with find and replacements
sort of like this:
replacements = {
" ": ""
,"&": "and"
,"/":""
,"+":"plus"
,"(":""
,")":""
}
df['VariableName']=df['VariableName'].replace(replacements,regex=True)
however this brings up the following error code:
error: nothing to repeat at position 0