# schema

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

Returns a [DataFrameSchema](schemas.html) object with the [DataFrame](dataframe.html) schema description. It can be printed to see column structure.

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

[ColumnGroups](datacolumn.html#columngroup) are marked by indentation:

```KOTLIN
df.schema()
```

Output:

```TEXT
name:
    firstName: String
    lastName: String
age: Int
city: String?
weight: Int?
isHappy: Boolean
```

[FrameColumns](datacolumn.html#framecolumn) are marked with `*`:

```KOTLIN
df.groupBy { city }.schema()
```

[Embedded content](resources/org.jetbrains.kotlinx.dataframe.samples.api.Analyze.schemaGroupBy.html)

Output:

```TEXT
city: String?
group: *
    name:
        firstName: String
        lastName: String
    age: Int
    city: String?
    weight: Int?
    isHappy: Boolean
```

