# isEmpty

> For the complete documentation index, see [llms.txt](https://kotlin.github.io/dataframe/llms.txt).

Returns `true` if [DataFrame](dataframe.html) has no rows or no columns.

API reference: [isEmpty](https://kotlin.github.io/dataframe/api-docs/core/org.jetbrains.kotlinx.dataframe.api/is-empty.html)

```KOTLIN
isEmpty()
```

Removing all columns with [remove](remove.html) keeps the number of rows, so a [DataFrame](dataframe.html) 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](datacolumn.html#columngroup) is a [DataFrame](dataframe.html) 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](datacolumn.html#framecolumn) are not taken into account: a dataframe whose frame column holds only empty dataframes — after [groupBy](groupby.html), for example — is not empty itself.

The examples below use this [DataFrame](dataframe.html):

| name | age |
| --- | --- |
| Alice | 15 |
| Charlie | 40 |

```KOTLIN
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](dataframe.html) has at least one row and at least one column, that is, if it is not empty.

```KOTLIN
isNotEmpty()
```

With the same two-row `df` as above:

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

See also [rowsCount()](rowscount.html) and [columnsCount()](columnscount.html) — the two numbers behind these checks, and [emptyDataFrame()](createdataframe.html#emptydataframe) for creating an empty dataframe.

