x = pd.DataFrame(dict(column1=["Lorum. ipsum.?"])) x["column1"] = x["column1"].str.replace('[^ws]','')