snowflake.snowpark.functions.percentile_approx¶ snowflake.snowpark.functions.percentile_approx(col: Union[Column, str], percentile: float) → Column[source]¶ Returns an approximated value for the desired percentile. This function uses the t-Digest algorithm. Example::CopyExpand>>> df = session.create_dataframe([0,1,2,3,4,5,6,7,8,9], schema=["a"]) >>> df.select(approx_percentile("a", 0.5).alias("result")).show() ------------ |"RESULT" | ------------ |4.5 | ------------ Show lessSee moreScroll to top