This is how you can trim trailing whitespace characters from a Pandas DataFrame. Or using the lstrip function to remove leading whitespace characters.