piper.verbs.str_squish

piper.verbs.str_squish(df: pandas.core.frame.DataFrame, str_columns: Optional[list] = None)pandas.core.frame.DataFrame[source]

reduce repeated whitespace inside a string.

Parameters
  • df – pandas dataframe

  • str_columns – Optional list of columns to strip. If None, all string data type columns will have repeated whitespaces replaced with single space.

Returns

Return type

A pandas dataframe