init research
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
||||
[//]: # (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
|
||||
```
|
||||
Reference in New Issue
Block a user