describe
Computes descriptive statistics for a given DataColumn, returning a DataFrame with key summary metrics.
This function provides a statistical summary of a given column, including its type, count, uniqueness, missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
For more information: See describe on the documentation website.
Return
A DataFrame where each row represents the descriptive statistics of a single column. The output contains one row per described column with the summary metrics as columns.
The Describe Operation
Computes descriptive statistics for all columns in a given DataFrame, including nested columns, returning a DataFrame with key summary metrics for each column (with a ColumnDescription data schema).
This function provides a statistical summary for all columns, including nested ones, providing their type, count, unique and missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
For more information: See describe on the documentation website.
Return
A DataFrame where each row represents the descriptive statistics of a single column in the input DataFrame. The output contains one row per described column with the summary metrics as columns.
The Describe Operation
Computes descriptive statistics for the selected columns in a given DataFrame, including nested columns, returning a DataFrame with key summary metrics for each column (with a ColumnDescription data schema).
This function provides a statistical summary for all columns, including nested ones, providing their type, count, unique and missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
See Selecting Columns.
For more information: See describe on the documentation website.
This Describe Overload
Select or express columns using the Columns Selection DSL.
This DSL is initiated by a Columns Selector lambda, which operates in the context of the Columns Selection DSL and expects you to return a SingleColumn or ColumnSet (so, a ColumnsResolver). This is an entity formed by calling any (combination) of the functions in the DSL that is or can be resolved into one or more columns.
The Columns Selection DSL allows using Extension Properties for specifying columns type- and name-safe.
Check out: Columns Selection DSL Grammar
See Column Selectors on the documentation website.
For example:
df.describe{ colsOf<Double>() }
Parameters
The Columns Selector that specifies which columns of this DataFrame should be described.
The Describe Operation
Computes descriptive statistics for the selected columns in a given DataFrame, including nested columns, returning a DataFrame with key summary metrics for each column (with a ColumnDescription data schema).
This function provides a statistical summary for all columns, including nested ones, providing their type, count, unique and missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
See Selecting Columns.
For more information: See describe on the documentation website.
This Describe Overload
Select single or multiple columns using their names as Strings. (String API).
For example:
df.describe("length", "age")
Parameters
The Column Names that specifies which columns of this DataFrame should be described.
Deprecated
It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html
The Describe Operation
Computes descriptive statistics for the selected columns in a given DataFrame, including nested columns, returning a DataFrame with key summary metrics for each column (with a ColumnDescription data schema).
This function provides a statistical summary for all columns, including nested ones, providing their type, count, unique and missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
See Selecting Columns.
For more information: See describe on the documentation website.
This Describe Overload
Parameters
The Column Accessors that specifies which columns of this DataFrame should be described.
Deprecated
It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html
The Describe Operation
Computes descriptive statistics for the selected columns in a given DataFrame, including nested columns, returning a DataFrame with key summary metrics for each column (with a ColumnDescription data schema).
This function provides a statistical summary for all columns, including nested ones, providing their type, count, unique and missing values, most frequent values, and statistical measures if applicable.
Summary Metrics:
name— The name of the column.path— path to the column (for hierarchicalDataFrame)type— The data type of the column (e.g., Int, String, Boolean).count— The total number of non-null values in the column.unique— The number of unique values in the column.nulls— The count of null (missing) values in the column.top— The most frequently occurring value in the column.freq— The frequency of the most common value.mean— The arithmetic mean (only for numeric columns).std— The standard deviation (only for numeric columns).min— The minimum value in the column.p25— The 25th percentile value (first quartile).median— The median value (50th percentile / second quartile).p75— The 75th percentile value (third quartile).max— The maximum value in the column.
For non-numeric columns, statistical metrics such as mean and std will return null. If column values are incomparable, percentile values (min, p25, median, p75, max) will also return null.
See Selecting Columns.
For more information: See describe on the documentation website.
This Describe Overload
Parameters
The KProperties that specifies which columns of this DataFrame should be described.