pandas.Series.str.strip — pandas 1.3.5 documentation
pandas.pydata.org › pandaspandas.Series.str.strip. ¶. Remove leading and trailing characters. Strip whitespaces (including newlines) or a set of specified characters from each string in the Series/Index from left and right sides. Equivalent to str.strip (). Specifying the set of characters to be removed. All combinations of this set of characters will be stripped.