snowflake.snowpark.functions.size¶ snowflake.snowpark.functions.size(col: Union[Column, str]) → Column[source]¶ Returns the size of the input ARRAY, OBJECT or MAP. Returns NULL if the input column does not match any of these types. Parameters: col – A Column object or column name that determines the values. Example::CopyExpand>>> df = session.create_dataframe([([1,2,3], {'a': 1, 'b': 2}, 3)], ['col1', 'col2', 'col3']) >>> df.select(size(df.col1), size(df.col2), size(df.col3)).show() ---------------------------------------------------------- |"SIZE(""COL1"")" |"SIZE(""COL2"")" |"SIZE(""COL3"")" | ---------------------------------------------------------- |3 |2 |NULL | ---------------------------------------------------------- Show lessSee moreScroll to top