snowflake.snowpark.functions.array_reverse¶
- snowflake.snowpark.functions.array_reverse(col: Union[Column, str]) Column [source]¶
Returns an array with the elements of the input array in reverse order.
- Parameters:
col – The source array.
- Example::
>>> df = session.sql("select [1, 2, 3, 4] :: ARRAY(INT) as A") >>> df.select(array_reverse("A")).show() -------------------------- |"ARRAY_REVERSE(""A"")" | -------------------------- |[ | | 4, | | 3, | | 2, | | 1 | |] | --------------------------