Why isn't the initial whitespace being removed in this example?
s = ' Spain'
s = s.replace('\s*', '')
In[1]:s
Out[1]: ' Spain'
I noticed this when I was removing whitespaces from a series using pandas .str.replace, so I tried in this simple example and did not understand why this does not work.