DataFrame 1.0 Help

isEmpty

Returns true if DataFrame has no rows or no columns.

isEmpty()

Removing all columns with remove keeps the number of rows, so a DataFrame can have rows and no columns. Such a dataframe holds no values, so it counts as empty as well as one without rows.

A ColumnGroup is a DataFrame too, and both cases apply to it: a column group is empty when it has no nested columns, or when the dataframe that holds it has no rows.

Nested dataframes of a FrameColumn are not taken into account: a dataframe whose frame column holds only empty dataframes — after groupBy, for example — is not empty itself.

The examples below use this DataFrame:

name

age

Alice

15

Charlie

40

df.isEmpty() // false df.filter { age > 100 }.isEmpty() // true: no row is left df.remove { all() }.isEmpty() // true: no column is left, while both rows are still there

isNotEmpty

Returns true if DataFrame has at least one row and at least one column, that is, if it is not empty.

isNotEmpty()

With the same two-row df as above:

df.isNotEmpty() // true df.filter { age > 100 }.isNotEmpty() // false: no row is left

See also rowsCount() and columnsCount() — the two numbers behind these checks, and emptyDataFrame() for creating an empty dataframe.

09 September 2026