Method: Polars::StringNameSpace#strip_chars

Defined in:
lib/polars/string_name_space.rb

#strip_chars(characters = nil) ⇒ Series

Remove leading and trailing whitespace.

Examples:

s = Polars::Series.new([" hello ", "\tworld"])
s.str.strip_chars
# =>
# shape: (2,)
# Series: '' [str]
# [
#         "hello"
#         "world"
# ]

Parameters:

  • characters (String) (defaults to: nil)

    The set of characters to be removed. All combinations of this set of characters will be stripped from the start and end of the string. If set to nil (default), all leading and trailing whitespace is removed instead.

Returns:



821
822
823
# File 'lib/polars/string_name_space.rb', line 821

def strip_chars(characters = nil)
  super
end