@@ -4,15 +4,13 @@ import org.jetbrains.kotlinx.dataframe.ColumnsSelector
4
4
import org.jetbrains.kotlinx.dataframe.DataColumn
5
5
import org.jetbrains.kotlinx.dataframe.DataFrame
6
6
import org.jetbrains.kotlinx.dataframe.DataRow
7
- import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.Usage
8
7
import org.jetbrains.kotlinx.dataframe.columns.ColumnPath
9
8
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
10
9
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
11
10
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
12
- import org.jetbrains.kotlinx.dataframe.documentation.AccessApi
13
- import org.jetbrains.kotlinx.dataframe.documentation.DocumentationUrls
14
11
import org.jetbrains.kotlinx.dataframe.documentation.Indent
15
12
import org.jetbrains.kotlinx.dataframe.documentation.LineBreak
13
+ import org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns
16
14
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl
17
15
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl.UsageTemplate
18
16
import org.jetbrains.kotlinx.dataframe.impl.columns.ColumnsList
@@ -21,20 +19,6 @@ import org.jetbrains.kotlinx.dataframe.util.COL_SELECT_DSL_LIST_DATACOLUMN_GET_R
21
19
import kotlin.experimental.ExperimentalTypeInference
22
20
import kotlin.reflect.KProperty
23
21
24
- /* *
25
- * Referring to or expressing column(s) in the selection DSL can be done in several ways corresponding to all
26
- * [Access APIs][AccessApi]:
27
- * TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286)
28
- *
29
- * [See Column Selectors on the documentation website.](https://kotlin.github.io/dataframe/columnselectors.html)
30
- */
31
- private interface CommonColumnSelectionDocs
32
-
33
- /* *
34
- *
35
- */
36
- private interface CommonColumnSelectionExamples
37
-
38
22
/* * [Columns Selection DSL][ColumnsSelectionDsl] */
39
23
internal interface ColumnsSelectionDslLink
40
24
@@ -52,18 +36,30 @@ public annotation class ColumnsSelectionDslMarker
52
36
53
37
/* *
54
38
* ## Columns Selection DSL
55
- * Referring to or expressing column(s) in the selection DSL can be done in several ways corresponding to all
56
- * [Access APIs][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]:
57
- * TODO: [Issue #286](https://github.com/Kotlin/dataframe/issues/286)
39
+ * Select or express columns using the [Columns Selection DSL][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl].
40
+ * (Any (combination of) [Access API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi]).
41
+ *
42
+ * This DSL comes in the form a [Columns Selector][org.jetbrains.kotlinx.dataframe.ColumnsSelector] lambda,
43
+ * which operates on the [Columns Selection DSL][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl] and
44
+ * expects you to return a [ColumnsResolver][org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver]; an entity formed by calling any (combination) of the functions
45
+ * in the DSL that is or can be resolved into one or more columns.
46
+ * ### Check out: [Columns Selection DSL Usage][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.Usage]
47
+ *
48
+ *
58
49
*
59
50
* [See Column Selectors on the documentation website.](https://kotlin.github.io/dataframe/columnselectors.html)
60
51
*
61
- * ### Check out: [Usage]
52
+ * #### For example:
53
+ *
54
+ * `df.`select` { length `[and][org.jetbrains.kotlinx.dataframe.api.AndColumnsSelectionDsl.and]` age }`
55
+ *
56
+ * `df.`select` { `[cols][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.cols]`(1..5) }`
57
+ *
58
+ * `df.`select` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl.colsOf]`<`[Double][Double]`>() }`
59
+ *
60
+ *
62
61
*
63
- * Can be safely cast to [SingleColumn] across the library. It does not directly
64
- * implement it for DSL purposes.
65
62
*
66
- * See [Usage] for the DSL Grammar of the ColumnsSelectionDsl.
67
63
*/
68
64
@ColumnsSelectionDslMarker
69
65
public interface ColumnsSelectionDsl <out T > : /* SingleColumn<DataRow<T>> */
0 commit comments