Problems with regular expression in Jupyter Notebook

Screen Link:

https://app.dataquest.io/m/347/working-with-missing-and-duplicate-data/3/correcting-data-cleaning-errors-that-result-in-missing-values
My Code:

happiness2017.columns = happiness2017.columns.str.replace('.', ' ').str.replace(' ', ' ').str.strip().str.upper()

What I expected to happen:
Clean data as shown :
COUNTRY 0
HAPPINESS RANK 9
HAPPINESS SCORE 9
WHISKER HIGH 9
WHISKER LOW 9

FREEDOM 9
GENEROSITY 9
TRUST GOVERNMENT CORRUPTION 9
DYSTOPIA RESIDUAL 9
YEAR 0

What actually happened:



<ipython-input-27-ecc4bb28258d>:1: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.
  happiness2017.columns = happiness2017.columns.str.replace('.', ' ').str.replace(' ', ' ').str.strip().str.upper()

COUNTRY                      0
HAPPINESSRANK                9
HAPPINESSSCORE               9
WHISKERHIGH                  9
WHISKERLOW                   9
ECONOMYGDPPERCAPITA          9
FAMILY                       9
HEALTHLIFEEXPECTANCY         9
FREEDOM                      9
GENEROSITY                   9
TRUSTGOVERNMENTCORRUPTION    9
DYSTOPIARESIDUAL             9
YEAR                         0
dtype: int64

Can someone tell me how to solve this in jupyter notebook? Much appreciated!!!

Hey, Samantha.

What exactly is the problem? Is the fact that you got a warning? Warnings aren’t necessarily bad. What that message is telling you is that pandas will change in a way that may make your code do something different in the future.