To Solve FutureWarning: The default value of regex will change from True to False in a future version Error The default value of regex for Series.str.replace() will change from True to False in a future release. In addition, single character regular expressions will not be treated as literal strings when regex=True is set (GH24804) so that Just  use regular expressions explicitly now.