class_docstr: Namespace for string related expressions.
class_docstr_tok: ["Namespace","for","string","related","expressions","."]
docstr: Convert a String column into a Decimal column.
  
  This method infers the needed parameters `precision` and `scale`.
  
  Parameters
  ----------
  inference_length
      Number of elements to parse to determine the `precision` and `scale`.
  
  Examples
  --------
  >>> df = pl.DataFrame(
  ...     {
  ...         "numbers": [
  ...             "40.12",
  ...             "3420.13",
  ...             "120134.19",
  ...             "3212.98",
  ...             "12.90",
  ...             "143.09",
  ...             "143.9",
  ...         ]
  ...     }
  ... )
  >>> df.with_columns(numbers_decimal=pl.col("numbers").str.to_decimal())
  shape: (7, 2)
  ┌───────────┬─────────────────┐
  │ numbers   ┆ numbers_decimal │
  │ ---       ┆ ---             │
  │ str       ┆ decimal[*,2]    │
  ╞═══════════╪═════════════════╡
  │ 40.12     ┆ 40.12           │
  │ 3420.13   ┆ 3420.13         │
  │ 120134.19 ┆ 120134.19       │
  │ 3212.98   ┆ 3212.98         │
  │ 12.90     ┆ 12.90           │
  │ 143.09    ┆ 143.09          │
  │ 143.9     ┆ 143.90          │
  └───────────┴─────────────────┘
docstr_tok: ["Convert","a","String","column","into","a","Decimal","column",".","This","method","infers","the","needed","parameters","`","precision","`","and","`","scale","`",".","Parameters","--","--","--","--","--","inference_length","Number","of","elements","to","parse","to","determine","the","`","precision","`","and","`","scale","`",".","Examples","--","--","--","--",">",">",">","df","=","pl.DataFrame","(","...","{","...","``","numbers","''",":","[","...","``","40.12","''",",","...","``","3420.13","''",",","...","``","120134.19","''",",","...","``","3212.98","''",",","...","``","12.90","''",",","...","``","143.09","''",",","...","``","143.9","''",",","...","]","...","}","...",")",">",">",">","df.with_columns","(","numbers_decimal=pl.col","(","``","numbers","''",")",".str.to_decimal","(",")",")","shape",":","(","7",",","2",")","\u250c\u2500\u2500\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\u2500\u2500\u2510","\u2502","numbers","\u2506","numbers_decimal","\u2502","\u2502","--","-","\u2506","--","-","\u2502","\u2502","str","\u2506","decimal","[","*",",2","]","\u2502","\u255e\u2550\u2550\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\u2550\u2550\u2561","\u2502","40.12","\u2506","40.12","\u2502","\u2502","3420.13","\u2506","3420.13","\u2502","\u2502","120134.19","\u2506","120134.19","\u2502","\u2502","3212.98","\u2506","3212.98","\u2502","\u2502","12.90","\u2506","12.90","\u2502","\u2502","143.09","\u2506","143.09","\u2502","\u2502","143.9","\u2506","143.90","\u2502","\u2514\u2500\u2500\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\u2500\u2500\u2518"]
code: def to_decimal(
      self,
      inference_length: int = 100,
  ) -> Expr:
      """
      Convert a String column into a Decimal column.
  
      This method infers the needed parameters `precision` and `scale`.
  
      Parameters
      ----------
      inference_length
          Number of elements to parse to determine the `precision` and `scale`.
  
      Examples
      --------
      >>> df = pl.DataFrame(
      ...     {
      ...         "numbers": [
      ...             "40.12",
      ...             "3420.13",
      ...             "120134.19",
      ...             "3212.98",
      ...             "12.90",
      ...             "143.09",
      ...             "143.9",
      ...         ]
      ...     }
      ... )
      >>> df.with_columns(numbers_decimal=pl.col("numbers").str.to_decimal())
      shape: (7, 2)
      ┌───────────┬─────────────────┐
      │ numbers   ┆ numbers_decimal │
      │ ---       ┆ ---             │
      │ str       ┆ decimal[*,2]    │
      ╞═══════════╪═════════════════╡
      │ 40.12     ┆ 40.12           │
      │ 3420.13   ┆ 3420.13         │
      │ 120134.19 ┆ 120134.19       │
      │ 3212.98   ┆ 3212.98         │
      │ 12.90     ┆ 12.90           │
      │ 143.09    ┆ 143.09          │
      │ 143.9     ┆ 143.90          │
      └───────────┴─────────────────┘
  
      """
      return wrap_expr(self._pyexpr.str_to_decimal(inference_length))
  
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 6 for calling the ExprStringNameSpace obj's underlying member method code with example usage: obj.to_decimal(inference_length) and returns: wrap_expr