Skip to content

Commit 2eb5c66

Browse files
committed
Explain the use-case for toDataFrame(columnName) in docs
1 parent 52bb360 commit 2eb5c66

File tree

4 files changed

+1476
-89
lines changed

4 files changed

+1476
-89
lines changed

docs/StardustDocs/topics/createDataFrame.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,14 @@ df.add("length") { value.length }
151151

152152
<!---END-->
153153

154-
Creates a [`DataFrame`](DataFrame.md) from [`Iterable<T>`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) with one column:
154+
Creates a [`DataFrame`](DataFrame.md) from an [`Iterable<T>`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/) with one column:
155155
"columnName: `DataColumn<T>`".
156+
This is an easy way to create a [`DataFrame`](DataFrame.md) when you have a list of Files, URLs, or a structure
157+
you want to extract data from.
158+
In a notebook,
159+
it can be convenient to start from the column of these values to see the number of rows, their `toString` in a table
160+
and then iteratively add columns with the parts of the data you're interested in.
161+
It could be File's content, a specific section of an HTML document, some metadata, etc.
156162

157163
<!---FUN toDataFrameColumn-->
158164

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a,b,c
2+
1,2,3
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
col1,col2,col3
2+
3.0,"str",1

0 commit comments

Comments
 (0)