I have a pandas.Series
des
, which contains all the text:
I want to remove all punctuation, so I did the following:
for i in range(len(des)):
for ch in punc:
if ch in des[i]:
des[i] = des[i].replace(ch, "", inplace=True)
However, I got a "TypeError: replace() takes no keyword arguments"
.
How can I fix it? Also, is there any more efficient way to remove punctuation for all rows of text in a series?