snowflake.snowpark.functions.to_double¶ snowflake.snowpark.functions.to_double(e: Union[Column, str], fmt: Optional[Union[Column, str]] = None) → Column[source]¶ Converts an input expression to a decimal. Example::CopyExpand>>> df = session.create_dataframe(['12', '11.3', '-90.12345'], schema=['a']) >>> df.select(to_double(col('a')).as_('ans')).collect() [Row(ANS=12.0), Row(ANS=11.3), Row(ANS=-90.12345)] Show lessSee moreScroll to top Example::CopyExpand>>> df = session.create_dataframe(['12+', '11.3+', '90.12-'], schema=['a']) >>> df.select(to_double(col('a'), "999.99MI").as_('ans')).collect() [Row(ANS=12.0), Row(ANS=11.3), Row(ANS=-90.12)] Show lessSee moreScroll to top