class_docstr: Namespace for string related expressions.
class_docstr_tok: ["Namespace","for","string","related","expressions","."]
docstr: Check if string values end with a substring.
  
  Parameters
  ----------
  suffix
      Suffix substring.
  
  See Also
  --------
  contains : Check if string contains a substring that matches a regex.
  starts_with : Check if string values start with a substring.
  
  Examples
  --------
  >>> df = pl.DataFrame({"fruits": ["apple", "mango", None]})
  >>> df.with_columns(
  ...     pl.col("fruits").str.ends_with("go").alias("has_suffix"),
  ... )
  shape: (3, 2)
  ┌────────┬────────────┐
  │ fruits ┆ has_suffix │
  │ ---    ┆ ---        │
  │ str    ┆ bool       │
  ╞════════╪════════════╡
  │ apple  ┆ false      │
  │ mango  ┆ true       │
  │ null   ┆ null       │
  └────────┴────────────┘
  
  >>> df = pl.DataFrame(
  ...     {"fruits": ["apple", "mango", "banana"], "suffix": ["le", "go", "nu"]}
  ... )
  >>> df.with_columns(
  ...     pl.col("fruits").str.ends_with(pl.col("suffix")).alias("has_suffix"),
  ... )
  shape: (3, 3)
  ┌────────┬────────┬────────────┐
  │ fruits ┆ suffix ┆ has_suffix │
  │ ---    ┆ ---    ┆ ---        │
  │ str    ┆ str    ┆ bool       │
  ╞════════╪════════╪════════════╡
  │ apple  ┆ le     ┆ true       │
  │ mango  ┆ go     ┆ true       │
  │ banana ┆ nu     ┆ false      │
  └────────┴────────┴────────────┘
  
  Using `ends_with` as a filter condition:
  
  >>> df.filter(pl.col("fruits").str.ends_with("go"))
  shape: (1, 2)
  ┌────────┬────────┐
  │ fruits ┆ suffix │
  │ ---    ┆ ---    │
  │ str    ┆ str    │
  ╞════════╪════════╡
  │ mango  ┆ go     │
  └────────┴────────┘
docstr_tok: ["Check","if","string","values","end","with","a","substring",".","Parameters","--","--","--","--","--","suffix","Suffix","substring",".","See","Also","--","--","--","--","contains",":","Check","if","string","contains","a","substring","that","matches","a","regex",".","starts_with",":","Check","if","string","values","start","with","a","substring",".","Examples","--","--","--","--",">",">",">","df","=","pl.DataFrame","(","{","``","fruits","''",":","[","``","apple","''",",","``","mango","''",",","None","]","}",")",">",">",">","df.with_columns","(","...","pl.col","(","``","fruits","''",")",".str.ends_with","(","``","go","''",")",".alias","(","``","has_suffix","''",")",",","...",")","shape",":","(","3",",","2",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","fruits","\u2506","has_suffix","\u2502","\u2502","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","bool","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","apple","\u2506","false","\u2502","\u2502","mango","\u2506","true","\u2502","\u2502","null","\u2506","null","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",">",">",">","df","=","pl.DataFrame","(","...","{","``","fruits","''",":","[","``","apple","''",",","``","mango","''",",","``","banana","''","]",",","``","suffix","''",":","[","``","le","''",",","``","go","''",",","``","nu","''","]","}","...",")",">",">",">","df.with_columns","(","...","pl.col","(","``","fruits","''",")",".str.ends_with","(","pl.col","(","``","suffix","''",")",")",".alias","(","``","has_suffix","''",")",",","...",")","shape",":","(","3",",","3",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","fruits","\u2506","suffix","\u2506","has_suffix","\u2502","\u2502","--","-","\u2506","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","str","\u2506","bool","\u2502","\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561","\u2502","apple","\u2506","le","\u2506","true","\u2502","\u2502","mango","\u2506","go","\u2506","true","\u2502","\u2502","banana","\u2506","nu","\u2506","false","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518","Using","`","ends_with","`","as","a","filter","condition",":",">",">",">","df.filter","(","pl.col","(","``","fruits","''",")",".str.ends_with","(","``","go","''",")",")","shape",":","(","1",",","2",")","\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510","\u2502","fruits","\u2506","suffix","\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\u2561","\u2502","mango","\u2506","go","\u2502","\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"]
code: def ends_with(self, suffix: str | Expr) -> Expr:
      """
      Check if string values end with a substring.
  
      Parameters
      ----------
      suffix
          Suffix substring.
  
      See Also
      --------
      contains : Check if string contains a substring that matches a regex.
      starts_with : Check if string values start with a substring.
  
      Examples
      --------
      >>> df = pl.DataFrame({"fruits": ["apple", "mango", None]})
      >>> df.with_columns(
      ...     pl.col("fruits").str.ends_with("go").alias("has_suffix"),
      ... )
      shape: (3, 2)
      ┌────────┬────────────┐
      │ fruits ┆ has_suffix │
      │ ---    ┆ ---        │
      │ str    ┆ bool       │
      ╞════════╪════════════╡
      │ apple  ┆ false      │
      │ mango  ┆ true       │
      │ null   ┆ null       │
      └────────┴────────────┘
  
      >>> df = pl.DataFrame(
      ...     {"fruits": ["apple", "mango", "banana"], "suffix": ["le", "go", "nu"]}
      ... )
      >>> df.with_columns(
      ...     pl.col("fruits").str.ends_with(pl.col("suffix")).alias("has_suffix"),
      ... )
      shape: (3, 3)
      ┌────────┬────────┬────────────┐
      │ fruits ┆ suffix ┆ has_suffix │
      │ ---    ┆ ---    ┆ ---        │
      │ str    ┆ str    ┆ bool       │
      ╞════════╪════════╪════════════╡
      │ apple  ┆ le     ┆ true       │
      │ mango  ┆ go     ┆ true       │
      │ banana ┆ nu     ┆ false      │
      └────────┴────────┴────────────┘
  
      Using `ends_with` as a filter condition:
  
      >>> df.filter(pl.col("fruits").str.ends_with("go"))
      shape: (1, 2)
      ┌────────┬────────┐
      │ fruits ┆ suffix │
      │ ---    ┆ ---    │
      │ str    ┆ str    │
      ╞════════╪════════╡
      │ mango  ┆ go     │
      └────────┴────────┘
  
      """
      suffix = parse_as_expression(suffix, str_as_lit=True)
      return wrap_expr(self._pyexpr.str_ends_with(suffix))
  
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 22 for calling the ExprStringNameSpace obj's underlying member method code with example usage: obj.ends_with(suffix) and returns: wrap_expr