I am new to python so this may be a very basic question. I am trying to use lambda to remove punctuation for each row in a pandas dataframe. I used the following, but received an error. I am trying to avoid having convert the df into a list then append the cleaned results into new list, then convert it back to a df.
Any suggestions would be appreciated!
import string
df['cleaned'] = df['old'].apply(lambda x: x.replace(c,'') for c in string.punctuation)