File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import org.jetbrains.kotlinx.dataframe.api.add
66import org.jetbrains.kotlinx.dataframe.api.column
77import org.jetbrains.kotlinx.dataframe.api.columnGroup
88import org.jetbrains.kotlinx.dataframe.api.columnOf
9+ import org.jetbrains.kotlinx.dataframe.api.emptyDataFrame
910import org.jetbrains.kotlinx.dataframe.api.dataFrameOf
1011import org.jetbrains.kotlinx.dataframe.api.filter
1112import org.jetbrains.kotlinx.dataframe.api.frameColumn
@@ -199,6 +200,15 @@ class Create : TestBase() {
199200 // SampleEnd
200201 }
201202
203+ @Test
204+ fun createEmptyDataFrame () {
205+ // SampleStart
206+ val df = emptyDataFrame()
207+ // SampleEnd
208+ df.columnsCount() shouldBe 0
209+ df.rowsCount() shouldBe 0
210+ }
211+
202212 @Test
203213 fun createDataFrameOf () {
204214 // SampleStart
Original file line number Diff line number Diff line change 33
44This section describes ways to create [ ` DataFrame ` ] ( DataFrame.md ) .
55
6+ ### emptyDataFrame
7+
8+ Returns [ ` DataFrame ` ] ( DataFrame.md ) with no rows and no columns.
9+
10+ <!-- -FUN createEmptyDataFrame-->
11+
12+ ``` kotlin
13+ val df = emptyDataFrame()
14+ ```
15+
16+ <!-- -END-->
17+
618### dataFrameOf
719
820Returns [ ` DataFrame ` ] ( DataFrame.md ) with given column names and values.
You can’t perform that action at this time.
0 commit comments