class_docstr: Namespace for string related expressions.
class_docstr_tok: ["Namespace","for","string","related","expressions","."]
docstr: Remove trailing characters.
  
  .. note::
      This method strips any characters present in `characters` from the
      end of the input, no matter their order. To strip a suffix (i.e.
      a "word" of characters in a certain order), use
      :func:`strip_suffix` instead.
  
  Parameters
  ----------
  characters
      The set of characters to be removed. All combinations of this set of
      characters will be stripped. If set to None (default), all whitespace is
      removed instead.
  
  See Also
  --------
  strip_suffix
  strip_chars_start
  
  Examples
  --------
  >>> df = pl.DataFrame({"foo": [" hello", "world\n"]})
  >>> df
  shape: (2, 1)
  ┌────────┐
  │ foo    │
  │ ---    │
  │ str    │
  ╞════════╡
  │  hello │
  │ world  │
  │        │
  └────────┘
  >>> df.with_columns(foo_strip_end=pl.col("foo").str.strip_chars_end())
  shape: (2, 2)
  ┌────────┬───────────────┐
  │ foo    ┆ foo_strip_end │
  │ ---    ┆ ---           │
  │ str    ┆ str           │
  ╞════════╪═══════════════╡
  │  hello ┆  hello        │
  │ world  ┆ world         │
  │        ┆               │
  └────────┴───────────────┘
  
  Characters can be stripped by passing a string as argument. Note that whitespace
  will not be stripped automatically when doing so, unless that whitespace is
  also included in the string.
  
  >>> df.with_columns(foo_strip_end=pl.col("foo").str.strip_chars_end("oldw "))
  shape: (2, 2)
  ┌────────┬───────────────┐
  │ foo    ┆ foo_strip_end │
  │ ---    ┆ ---           │
  │ str    ┆ str           │
  ╞════════╪═══════════════╡
  │  hello ┆  he           │
  │ world  ┆ world         │
  │        ┆               │
  └────────┴───────────────┘
  
  The order of the provided characters does not matter, they behave like a set.
  
  >>> pl.DataFrame({"foo": ["abcdeff"]}).with_columns(
  ...     foo_strip_end=pl.col("foo").str.strip_chars_end("fed")
  ... )
  shape: (1, 2)
  ┌─────────┬───────────────┐
  │ foo     ┆ foo_strip_end │
  │ ---     ┆ ---           │
  │ str     ┆ str           │
  ╞═════════╪═══════════════╡
  │ abcdeff ┆ abc           │
  └─────────┴───────────────┘
docstr_tok: ["Remove","trailing","characters",".","..","note",":",":","This","method","strips","any","characters","present","in","`","characters","`","from","the","end","of","the","input",",","no","matter","their","order",".","To","strip","a","suffix","(","i.e",".","a","``","word","''","of","characters","in","a","certain","order",")",",","use",":","func",":","`","strip_suffix","`","instead",".","Parameters","--","--","--","--","--","characters","The","set","of","characters","to","be","removed",".","All","combinations","of","this","set","of","characters","will","be","stripped",".","If","set","to","None","(","default",")",",","all","whitespace","is","removed","instead",".","See","Also","--","--","--","--","strip_suffix","strip_chars_start","Examples","--","--","--","--",">",">",">","df","=","pl.DataFrame","(","{","``","foo","''",":","[","``","hello","''",",","``","world\\n","''","]","}",")",">",">",">","df","shape",":","(","2",",","1",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","foo","\u2502","\u2502","--","-","\u2502","\u2502","str","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","hello","\u2502","\u2502","world","\u2502","\u2502","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",">",">",">","df.with_columns","(","foo_strip_end=pl.col","(","``","foo","''",")",".str.strip_chars_end","(",")",")","shape",":","(","2",",","2",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","foo","\u2506","foo_strip_end","\u2502","\u2502","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","str","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","hello","\u2506","hello","\u2502","\u2502","world","\u2506","world","\u2502","\u2502","\u2506","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518","Characters","can","be","stripped","by","passing","a","string","as","argument",".","Note","that","whitespace","will","not","be","stripped","automatically","when","doing","so",",","unless","that","whitespace","is","also","included","in","the","string",".",">",">",">","df.with_columns","(","foo_strip_end=pl.col","(","``","foo","''",")",".str.strip_chars_end","(","``","oldw","``",")",")","shape",":","(","2",",","2",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","foo","\u2506","foo_strip_end","\u2502","\u2502","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","str","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","hello","\u2506","he","\u2502","\u2502","world","\u2506","world","\u2502","\u2502","\u2506","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518","The","order","of","the","provided","characters","does","not","matter",",","they","behave","like","a","set",".",">",">",">","pl.DataFrame","(","{","``","foo","''",":","[","``","abcdeff","''","]","}",")",".with_columns","(","...","foo_strip_end=pl.col","(","``","foo","''",")",".str.strip_chars_end","(","``","fed","''",")","...",")","shape",":","(","1",",","2",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","foo","\u2506","foo_strip_end","\u2502","\u2502","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","str","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","abcdeff","\u2506","abc","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"]
code: def strip_chars_end(
      self, characters: IntoExprColumn | None = None
  ) -> Expr:
      r"""
      Remove trailing characters.
  
      .. note::
          This method strips any characters present in `characters` from the
          end of the input, no matter their order. To strip a suffix (i.e.
          a "word" of characters in a certain order), use
          :func:`strip_suffix` instead.
  
      Parameters
      ----------
      characters
          The set of characters to be removed. All combinations of this set of
          characters will be stripped. If set to None (default), all whitespace is
          removed instead.
  
      See Also
      --------
      strip_suffix
      strip_chars_start
  
      Examples
      --------
      >>> df = pl.DataFrame({"foo": [" hello", "world\n"]})
      >>> df
      shape: (2, 1)
      ┌────────┐
      │ foo    │
      │ ---    │
      │ str    │
      ╞════════╡
      │  hello │
      │ world  │
      │        │
      └────────┘
      >>> df.with_columns(foo_strip_end=pl.col("foo").str.strip_chars_end())
      shape: (2, 2)
      ┌────────┬───────────────┐
      │ foo    ┆ foo_strip_end │
      │ ---    ┆ ---           │
      │ str    ┆ str           │
      ╞════════╪═══════════════╡
      │  hello ┆  hello        │
      │ world  ┆ world         │
      │        ┆               │
      └────────┴───────────────┘
  
      Characters can be stripped by passing a string as argument. Note that whitespace
      will not be stripped automatically when doing so, unless that whitespace is
      also included in the string.
  
      >>> df.with_columns(foo_strip_end=pl.col("foo").str.strip_chars_end("oldw "))
      shape: (2, 2)
      ┌────────┬───────────────┐
      │ foo    ┆ foo_strip_end │
      │ ---    ┆ ---           │
      │ str    ┆ str           │
      ╞════════╪═══════════════╡
      │  hello ┆  he           │
      │ world  ┆ world         │
      │        ┆               │
      └────────┴───────────────┘
  
      The order of the provided characters does not matter, they behave like a set.
  
      >>> pl.DataFrame({"foo": ["abcdeff"]}).with_columns(
      ...     foo_strip_end=pl.col("foo").str.strip_chars_end("fed")
      ... )
      shape: (1, 2)
      ┌─────────┬───────────────┐
      │ foo     ┆ foo_strip_end │
      │ ---     ┆ ---           │
      │ str     ┆ str           │
      ╞═════════╪═══════════════╡
      │ abcdeff ┆ abc           │
      └─────────┴───────────────┘
  
      """
      characters = parse_as_expression(characters, str_as_lit=True)
      return wrap_expr(self._pyexpr.str_strip_chars_end(characters))
  
imports: from __future__ import annotations
  import warnings
  from typing import TYPE_CHECKING
  import polars._reexport
  from polars import functions
  from polars.datatypes import Date, Datetime, Int32, Time, py_type_to_dtype
  from polars.exceptions import ChronoFormatWarning
  from polars.utils._parse_expr_input import parse_as_expression
  from polars.utils._wrap import wrap_expr
  from polars.utils.deprecation import deprecate_renamed_function, deprecate_renamed_parameter, rename_use_earliest_to_ambiguous
  from polars.utils.various import find_stacklevel
label_desc: Use image node_id 15 for calling the ExprStringNameSpace obj's underlying member method code with example usage: obj.strip_chars_end(characters) and returns: wrap_expr