Files
2026-02-08 11:20:43 -10:00

53 lines
933 B
Markdown
Vendored

[//]: # (title: schema)
<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.api.Analyze-->
Returns [`DataFrameSchema`](schemas.md) object with [`DataFrame`](DataFrame.md) schema description. It can be printed to see column structure.
[`ColumnGroups`](DataColumn.md#columngroup) are marked by indentation:
<!---FUN schema-->
```kotlin
df.schema()
```
<!---END-->
Output:
```text
name:
firstName: String
lastName: String
age: Int
city: String?
weight: Int?
isHappy: Boolean
```
[`FrameColumns`](DataColumn.md#framecolumn) are marked with `*`:
<!---FUN schemaGroupBy-->
```kotlin
df.groupBy { city }.schema()
```
<inline-frame src="resources/org.jetbrains.kotlinx.dataframe.samples.api.Analyze.schemaGroupBy.html" width="100%"/>
<!---END-->
Output:
```text
city: String?
group: *
name:
firstName: String
lastName: String
age: Int
city: String?
weight: Int?
isHappy: Boolean
```