snowflake.snowpark.DataFrame.describe¶

DataFrame.describe(*cols: Union[str, List[str]]) → DataFrame[source]¶

Computes basic statistics for numeric columns, which includes count, mean, stddev, min, and max. If no columns are provided, this function computes statistics for all numerical or string columns. Non-numeric and non-string columns will be ignored when calling this method.

Example::
>>> df = session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"])
>>> desc_result = df.describe().sort("SUMMARY").show()
-------------------------------------------------------
|"SUMMARY"  |"A"                 |"B"                 |
-------------------------------------------------------
|count      |2.0                 |2.0                 |
|max        |3.0                 |4.0                 |
|mean       |2.0                 |3.0                 |
|min        |1.0                 |2.0                 |
|stddev     |1.4142135623730951  |1.4142135623730951  |
-------------------------------------------------------
Copy
Parameters:

cols – The names of columns whose basic statistics are computed.