class_docstr: Series.str namespace.
class_docstr_tok: ["Series.str","namespace","."]
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
  --------
  >>> s = pl.Series(
  ...     ["40.12", "3420.13", "120134.19", "3212.98", "12.90", "143.09", "143.9"]
  ... )
  >>> s.str.to_decimal()
  shape: (7,)
  Series: '' [decimal[*,2]]
  [
      40.12
      3420.13
      120134.19
      3212.98
      12.90
      143.09
      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","--","--","--","--",">",">",">","s","=","pl.Series","(","...","[","``","40.12","''",",","``","3420.13","''",",","``","120134.19","''",",","``","3212.98","''",",","``","12.90","''",",","``","143.09","''",",","``","143.9","''","]","...",")",">",">",">","s.str.to_decimal","(",")","shape",":","(","7",",",")","Series",":","``","[","decimal","[","*",",2","]","]","[","40.12","3420.13","120134.19","3212.98","12.90","143.09","143.90","]"]
code: def to_decimal(
      self,
      inference_length: int = 100,
  ) -> Series:
      """
      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
      --------
      >>> s = pl.Series(
      ...     ["40.12", "3420.13", "120134.19", "3212.98", "12.90", "143.09", "143.9"]
      ... )
      >>> s.str.to_decimal()
      shape: (7,)
      Series: '' [decimal[*,2]]
      [
          40.12
          3420.13
          120134.19
          3212.98
          12.90
          143.09
          143.90
      ]
  
      """
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from polars.series.utils import expr_dispatch
  from polars.utils.deprecation import deprecate_renamed_function, deprecate_renamed_parameter
label_desc: Use image node_id 6 for calling the StringNameSpace obj's underlying member method code with example usage: obj.to_decimal(inference_length) without return types