I am working on a machine learning problem, and I am trying to write a lambda function to remove the punctuation from a pandas column, unfortunately the lamda expression is not working as expected
combi['tidy_tweet'] = combi['tidy_tweet'].apply(lambda x: x.replace("[^a-zA-Z#]", " "))
The above expression leaves the column intact, while I expect it to remove the punctuation.
Does anybody have any idea what is wrong with the lambda expression above?