AggregateDsl
A specialized ColumnsSelectionDsl that allows you to aggregate DataFrame or DataFrame-like structures (GroupBy, Pivot or PivotGroupBy).
AggregateDsl allows you to compute statistics on the columns of the DataFrame or columns within groups in GroupBy, Pivot, or PivotGroupBy and store the results as a new column using into. The given aggregating expression is applied to each group independently.
The resulting DataFrame or DataRow has the same structure as the original DataFrame, GroupBy, Pivot or PivotGroupBy; instead of the groups, there are new columns of aggregated values created with into.
You can use any of DataFrame Aggregation Statistics or any custom aggregation function.
Aggregated values can be either simple values, data rows or even data frames. Including them in the result using into will lead to creating a value column, a column group, or a frame column respectively in the resulting DataFrame or DataRow while preserving the original structure at higher levels.
Inheritors
Properties
Accesses the 'key' column of this KeyValueProperty ColumnsContainer.
Functions
Creates new columns using the AddDsl builder.
Adds all columns from the given dataFrames to the end of this DataFrame (at the top level).
Creates a new column using an AddExpression and adds a new column to the end of this DataFrame (at the top level).
Creates a new column using AddExpression and inserts it at the specified ColumnPath.
Aggregates this DataFrame using the provided statistics inside the AggregateDsl.
With the compiler plugin, schema marker T of DataFrame can be a local type. You cannot refer to it directly from your code, like a type argument for cast. The example below shows a situation where you'd need to cast DataFrame<*> to DataFrameschemaFrom
Splits this DataFrame into consecutive chunks of up to size rows and returns them as a FrameColumn.
Splits this DataFrame into chunks starting at the given startIndices.
Creates a FrameColumn from this by splitting the dataframe into smaller ones, based on the given startIndices.
Returns the compile-time DataFrameSchema of this DataFrame: the schema that follows from its type argument T, not from the columns it holds.
Converts the values in the specified columns either to a supported target type or using a custom converter, keeping their original names and positions within the DataFrame.
Converts specified columns using row converter expression within the DataFrame. Provide a new value for every selected cell given its row and its previous value using a row value expression.
Converts values in DataFrame to match given column schema schemaType.
Returns the number of distinct rows in this DataFrame.
Computes the cumulative sums of the values in each column from the DataFrame from the first cell to the last cell.
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).
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).
Removes duplicated rows based on all columns.
Selects the specified columns and keeps only distinct rows based on these selected columns.
Removes duplicated rows based on the specified columns.
Removes rows with null values. Specific case of drop.
Performs an exclude join of this DataFrame with the other DataFrame using the selected key columns. Includes only rows from the left DataFrame that do not have a match in the right one; right-side columns are not merged.
Performs an exclude join of this DataFrame with the right DataFrame using the provided joinExpression. Includes only rows from the left DataFrame that do not have a match in the right one; right-side columns are not merged.
Splits list-like values in the specified columns and spreads them vertically — that is, it adds a separate row for each element (one value per row). Values in all other columns are duplicated to preserve row context.
Splits list-like values in the specified columns and spreads them vertically — that is, it adds a separate row for each element (one value per row). Values in all other columns are duplicated to preserve row context.
Replaces null values with the given value or expression. Specific case of update.
Performs a filter join of this DataFrame with the other DataFrame using the selected key columns. Includes only rows from the left DataFrame that have a match in the right one; right-side columns are not merged.
Performs a filter join of this DataFrame with the right DataFrame using the provided joinExpression. Includes only rows from the left DataFrame that have a match in the right one; right-side columns are not merged.
Removes all column groups in the DataFrame, replacing them with their leaf columns.
Removes specified column groups in the DataFrame, replacing them with their leaf columns.
Removes selected column groups in the DataFrame, replacing them with their leaf columns.
Formats the specified columns or cells within this dataframe such that they have specific CSS attributes applied to them when rendering the dataframe to HTML.
Formats the specified columns or cells within this dataframe such that they have specific CSS attributes applied to them when rendering the dataframe to HTML.
Experimental API. It may be changed in the future.
Generates a CodeString containing generated @DataSchema data classes for the given DataFrame's schema (including all nested frame columns and column groups).
Generates a CodeString containing generated @DataSchema interfaces for the given DataFrame's schema (including all nested frame columns and column groups).
Returns a list of columns selected by columns, a ColumnsSelectionDsl.
Creates a ColumnPath from the receiver and the given column name column. This is a shorthand for pathOf("myColumnName", "myNestedColumnName") and is often used in combination with ColumnPath.invoke to retrieve the value of a nested column. For instance:
Retrieves the value of this KProperty Accessor from the DataFrame.
As extension to "myColumn"["myNestedColumn"], this function enables "myColumn"["myNestedColumn"]["myDoublyNestedColumn"] as alternative to pathOf("myColumn", "myNestedColumn", "myDoublyNestedColumn")
Returns a list of columns selected by columns, a ColumnsSelectionDsl.
Groups the specified columns within the DataFrame into column group.
Groups the rows of this DataFrame based on the values in one or more specified key columns. Each unique value in a key column — or a unique tuple of values for multiple columns — defines the group consisting of all rows where the column(s) contain that value combination.
Performs an inner join of this DataFrame with the right DataFrame using the provided joinExpression. Includes only matching rows from both DataFrames; rows are merged.
Creates a new column using the provided expression and inserts it into this DataFrame.
Emulates selecting all columns whose values are mutually comparable to each other. These are columns of type R where R : Comparable<R>.
Retrieves the value of the column with this name from the DataFrame. This can be both typed and untyped. This is a shorthand for get("myColumnName") and can be written as "myColumnName"<MyColumnType>() instead.
Retrieves the value of the column with this name from the DataFrame. This can be both typed and untyped. This is a shorthand for get("myColumnName") and can be written as "myColumnName"() instead.
Retrieves the value of this KProperty Accessor from the DataFrame.
Retrieves the value of this ColumnPath from the DataFrame. This is a shorthand for getColumn(myColumnPath) and is most often used in combination with operator fun String.get(column: String), for instance:
Retrieves the value of this ColumnReference or -Accessor from the DataFrame.
Returns true if this DataFrame has at least one row and at least one column, that is, if it is not empty.
Returns a new DataColumn with the given name and the values that body computes from the rows of this ColumnsContainer.
Returns a new DataColumn with the given name and the values that body computes from the rows of this DataFrame.
Returns the maximum of the values of each suitable column of this DataFrame separately.
Returns a single maximum of all the values in the selected columns of this DataFrame.
Returns the first row of this DataFrame for which the given expression returns the maximum value.
Returns the first row of this DataFrame that has the largest value in the column with the given name.
Returns the first row of this DataFrame for which the given expression returns the maximum value, or null if there is nothing to compare.
Returns the first row of this DataFrame that has the largest value in the column with the given name, or null if there is nothing to compare.
Returns the maximum of the values of each selected column of this DataFrame separately.
Returns the maximum of the values that the given expression returns for each row of this DataFrame, or null if there is nothing to compare.
Returns a single maximum of all the values in the selected columns of this DataFrame, or null if there is nothing to compare.
Returns the mean of the values of each suitable column of this DataFrame separately.
Returns the mean of the values of each selected column of this DataFrame separately.
Returns the median of the values of each suitable column of this DataFrame separately.
Returns a single median of all the comparable values in the selected columns of this DataFrame.
Returns a single median of all the values in the columns of this DataFrame with the given names.
Returns the row of this DataFrame at the median of the values that the given expression returns for each row.
Returns the row of this DataFrame at the median of the values in the column with the given name.
Returns the row of this DataFrame at the median of the values that the given expression returns for each row, or null if there is nothing to compute the median of.
Returns the row of this DataFrame at the median of the values in the column with the given name, or null if there is nothing to compute the median of.
Returns the median of the values of each selected column of this DataFrame separately.
Returns the median of the comparable values that the given expression returns for each row of this DataFrame.
Returns the median of the numbers that the given expression returns for each row of this DataFrame, as a Double.
Returns the median of the comparable values that the given expression returns for each row of this DataFrame, or null if there is nothing to compute the median of.
Returns the median of the numbers that the given expression returns for each row of this DataFrame, as a Double, or null if there is nothing to compute the median of.
Returns a single median of all the comparable values in the selected columns of this DataFrame, or null if there is nothing to compute the median of.
Returns a single median of all the numbers in the selected columns of this DataFrame, as a Double, or null if there is nothing to compute the median of.
Returns a single median of all the values in the columns of this DataFrame with the given names, or null if there is nothing to compute the median of.
Returns the minimum of the values of each suitable column of this DataFrame separately.
Returns a single minimum of all the values in the selected columns of this DataFrame.
Returns the first row of this DataFrame for which the given expression returns the minimum value.
Returns the first row of this DataFrame that has the smallest value in the column with the given name.
Returns the first row of this DataFrame for which the given expression returns the minimum value, or null if there is nothing to compare.
Returns the first row of this DataFrame that has the smallest value in the column with the given name, or null if there is nothing to compare.
Returns the minimum of the values of each selected column of this DataFrame separately.
Returns the minimum of the values that the given expression returns for each row of this DataFrame, or null if there is nothing to compare.
Returns a single minimum of all the values in the selected columns of this DataFrame, or null if there is nothing to compare.
Moves the specified columns to a new position specified by newColumnIndex within the DataFrame.
Moves the specified columns to a new position specified by newColumnIndex. If insideGroup is true selected columns will be moved remaining within their ColumnGroup, else they will be moved to the top level.
Returns the given percentile of the values of each suitable column of this DataFrame separately.
Returns a single percentile of all the comparable values in the selected columns of this DataFrame.
Returns a single percentile of all the numbers in the selected columns of this DataFrame, as a Double.
Returns a single percentile of all the values in the columns of this DataFrame with the given names.
Returns the row of this DataFrame at the given percentile of the values that the given expression returns for each row.
Returns the row of this DataFrame at the given percentile of the values in the column with the given name.
Returns the row of this DataFrame at the given percentile of the values that the given expression returns for each row, or null if there is nothing to compute the percentile of.
Returns the row of this DataFrame at the given percentile of the values in the column with the given name, or null if there is nothing to compute the percentile of.
Returns the given percentile of the values of each selected column of this DataFrame separately.
Returns the given percentile of the comparable values that the given expression returns for each row of this DataFrame.
Returns the given percentile of the numbers that the given expression returns for each row of this DataFrame, as a Double.
Returns the given percentile of the comparable values that the given expression returns for each row of this DataFrame, or null if there is nothing to compute the percentile of.
Returns the given percentile of the numbers that the given expression returns for each row of this DataFrame, as a Double, or null if there is nothing to compute the percentile of.
Returns a single percentile of all the comparable values in the selected columns of this DataFrame, or null if there is nothing to compute the percentile of.
Returns a single percentile of all the numbers in the selected columns of this DataFrame, as a Double, or null if there is nothing to compute the percentile of.
Returns a single percentile of all the values in the columns of this DataFrame with the given names, or null if there is nothing to compute the percentile of.
Computes a count matrix (similar to frequency encoding) for the values in the specified columns of this DataFrame, returning a new DataFrame where:
Computes a presence matrix (similar to one-hot encoding) for the values in the specified columns of this DataFrame, returning a new DataFrame where:
Utility property to access scope with only dataframe column properties for code completion, filtering out DataFrame API.
Renames columns in the DataFrame.
Reorders the selected columns of the DataFrame.
Puts all columns of the DataFrame in order of the value of the expression and returns a new DataFrame.
Performs a right join of this DataFrame with the other DataFrame using the selected key columns. Includes all rows from the right DataFrame; matching rows are merged, unmatched left-side values are filled with null.
Performs a right join of this DataFrame with the right DataFrame using the provided joinExpression. Includes all rows from the right DataFrame; matching rows are merged, unmatched left-side values are filled with null.
Returns the runtime DataFrameSchema of this DataFrame, read from the columns it holds.
Returns the standard deviation of the values of each suitable column of this DataFrame separately.
Returns the standard deviation of the values of each selected column of this DataFrame separately.
Returns the sum of the values of each suitable column of this DataFrame separately.
Returns a single sum of all the values in the selected columns of this DataFrame.
Returns the sum of the values of each selected column of this DataFrame separately.
Returns the sum of the Byte values that the given expression returns for each row of this DataFrame, as an Int.
Returns the sum of the Short values that the given expression returns for each row of this DataFrame, as an Int.
Returns the sum of the values that the given expression returns for each row of this DataFrame.
Returns a DataFrameHtmlData without additional definitions. Can be rendered in Jupyter kernel (Kotlin Notebook) environments or other environments that already have CSS- and script definitions for DataFrame.
Returns a DataFrameHtmlData with CSS- and script definitions for DataFrame.
Renders this DataFrame as static HTML (meaning no JS is used). CSS rendering is enabled by default but can be turned off using includeCss
Returns a new DataFrame in which the selected columns of objects are turned into ColumnGroups, with a column for every public property of these objects. The other columns and the order of the columns stay the same.
Ungroups the specified column groups within the DataFrame, i.e., replaces each ColumnGroup with its nested columns.
Returns the DataFrame with changed values in some cells (column types cannot be changed).
Returns a DataFrame containing the counts of unique rows (or combinations of selected values) in this DataFrame.
Returns a cross-section of this DataFrame: only the rows in which the key columns hold the given keyValues, without those key columns.
Returns a cross-section of this DataFrame: only the rows in which the key columns hold the given keyValues, without those key columns.