Skip to content

Commit

Permalink
Explain the use-case for toDataFrame(columnName) in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
koperagen committed Aug 26, 2024
1 parent 52bb360 commit 2eb5c66
Show file tree
Hide file tree
Showing 4 changed files with 1,476 additions and 89 deletions.
8 changes: 7 additions & 1 deletion docs/StardustDocs/topics/createDataFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,14 @@ df.add("length") { value.length }

<!---END-->

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

<!---FUN toDataFrameColumn-->

Expand Down
2 changes: 2 additions & 0 deletions examples/notebooks/feature_overviews/0.14.0/data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a,b,c
1,2,3
2 changes: 2 additions & 0 deletions examples/notebooks/feature_overviews/0.14.0/data1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
col1,col2,col3
3.0,"str",1
Loading

0 comments on commit 2eb5c66

Please sign in to comment.