# You can use replace and pass the strings to find/replace as dictionary keys/items: df.replace({' ': '<br/>'}, regex=True)