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
6
6
import org.jetbrains.kotlinx.dataframe.api.column
7
7
import org.jetbrains.kotlinx.dataframe.api.columnGroup
8
8
import org.jetbrains.kotlinx.dataframe.api.columnOf
9
+ import org.jetbrains.kotlinx.dataframe.api.emptyDataFrame
9
10
import org.jetbrains.kotlinx.dataframe.api.dataFrameOf
10
11
import org.jetbrains.kotlinx.dataframe.api.filter
11
12
import org.jetbrains.kotlinx.dataframe.api.frameColumn
@@ -199,6 +200,15 @@ class Create : TestBase() {
199
200
// SampleEnd
200
201
}
201
202
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
+
202
212
@Test
203
213
fun createDataFrameOf () {
204
214
// SampleStart
Original file line number Diff line number Diff line change 3
3
4
4
This section describes ways to create [ ` DataFrame ` ] ( DataFrame.md ) .
5
5
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
+
6
18
### dataFrameOf
7
19
8
20
Returns [ ` DataFrame ` ] ( DataFrame.md ) with given column names and values.
You can’t perform that action at this time.
0 commit comments