Apply korro to samples in data sources#1833
Conversation
|
Is the package correct for the samples? Should |
| Kotlin DataFrame can read Parquet files through Apache Arrow’s Dataset API. Learn how and when to use it. | ||
| </link-summary> | ||
|
|
||
| <!---IMPORT org.jetbrains.kotlinx.dataframe.samples.io.Parquet--> |
There was a problem hiding this comment.
I added the import and applied korro, so some samples below were changed by the functions in Parquet.kt that had already existed
| <!---FUN readJson--> | ||
|
|
||
| ```kotlin | ||
| val df = DataFrame.readJson(file) |
There was a problem hiding this comment.
Maybe worth to turn code snipper with text above into
val text = """[
{
"A": "1",
"B": 1,
"C": 1.0,
"D": true
},
{
"A": "2",
"B": 2,
"C": 1.1,
"D": null
},
{
"A": "3",
"B": 3,
"C": 1,
"D": false
},
{
"A": "4",
"B": 4,
"C": 1.3,
"D": true
}
]
"""
val df = DataFrame.readJsonStr(text)
|
Tables in |
655d665 to
9fe3c6d
Compare
I have done it in these sections (and in some others for consistency) and also added iframes for the results where it seemed useful |
9fe3c6d to
dedd1db
Compare
Adds usage of
korroto the samples in the following webpages:Related to #987, but does not change https://kotlinlang.org/docs/data-analysis-connect-to-db.html (as it will be done separately later). In addition, https://kotlin.github.io/dataframe/readsqlfromcustomdatabase.html was already done by @Jolanrensen