first
First (Col)
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
This function operates solely on columns at the top-level.
NOTE: For column groups, first is named firstCol instead to avoid confusion.
For more information: See First (Col), Last (Col), Single (Col) on the documentation website.
Check out: Grammar
Examples:
df.select{ first{ it.name().startsWith("order") } }
df.select{ "myColumnGroup".firstCol{ it.name().startsWith("year") } }
Examples for this overload:
df.select{ colsOf<String>().first{ it.name().startsWith("year") } }
df.select{ colsOf<Int>().first() }
Return
A SingleColumn containing the first column that adheres to the given condition.
Parameters
The optional ColumnFilter condition that the column must adhere to.
See also
Throws
if no column adheres to the given condition.
First (Col)
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
This function operates solely on columns at the top-level.
NOTE: For column groups, first is named firstCol instead to avoid confusion.
For more information: See First (Col), Last (Col), Single (Col) on the documentation website.
Check out: Grammar
Examples:
df.select{ first{ it.name().startsWith("order") } }
df.select{ "myColumnGroup".firstCol{ it.name().startsWith("year") } }
Examples for this overload:
df.select{ first{ it.name().startsWith("year") } }
Return
A SingleColumn containing the first column that adheres to the given condition.
Parameters
The optional ColumnFilter condition that the column must adhere to.
See also
Throws
if no column adheres to the given condition.