i have made this code to replace all the non alphabet with the space but i am not getting the spaces doing this is clearing all the spaces
edit = [["this, is sample 1."],["this!is @ sample two.*"]]
def clearpunch(sentence):
clean = re.sub(r"'|\W|\d|_",r" ",sentence)
return clean
edit = edit.map(clearpunch)
edit
getting text like this "[["thisissample"], ["thisissampletwo"]]"
and i want a text like "[["this is sample "], ["this is sample two "]]"