import re re.sub(' +', ' ', 'The quick brown fox') 'The quick brown fox'
' '.join(myString.split())
#converting double spaces into single spaces df["combined"]=df["combined"].replace('\s+', ' ', regex=True)