snowflake.snowpark.functions.count¶ snowflake.snowpark.functions.count(e: ColumnOrName) → Column[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.3.0/src/snowflake/snowpark/functions.py#L553-L579)¶ Returns either the number of non-NULL records for the specified columns, or the total number of records. Example CopyExpand>>> df = session.create_dataframe([[1], [None], [3], [4], [None]], schema=["a"]) >>> df.select(count(col("a")).alias("result")).show() ------------ |"RESULT" | ------------ |3 | ------------ >>> df.select(count("*").alias("result")).show() ------------ |"RESULT" | ------------ |5 | ------------ Show lessSee moreScroll to top