I am dealing with a very dirty data that has different kinds of character that I need to remove. Below is just a snapshot. I just want it remove only these characters from the starting character, however it removes all the characters in the col1. Data is in data frame:
col1:
, Matt R, Carl A
_ Hello, World_
). My Name is ). 'Amy'
. My name is 'Matt'
., My name is 'Clark'
My name is 'Amy' #clean row
Code:
articles[col1].str.replace(",","")
articles[col1].str.replace("_","")
articles[col1].str.replace(").","")
articles[col1].str.replace(".","")
articles[col1].str.replace(".,","")