File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api
src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -812,6 +812,14 @@ class Access : TestBase() {
812
812
df.select { drop(2 ) }
813
813
df.select { dropLast(2 ) }
814
814
815
+ // find the first column satisfying the condition
816
+ df.select { first { it.name().startsWith(" year" ) } }
817
+
818
+ // find the last column inside a column group satisfying the condition
819
+ df.select {
820
+ group(" name" ).last { it.name().endsWith(" Name" ) }
821
+ }
822
+
815
823
// depth-first-search traversal of all columns, excluding ColumnGroups from result
816
824
df.select { allDfs() }
817
825
Original file line number Diff line number Diff line change @@ -812,6 +812,14 @@ class Access : TestBase() {
812
812
df.select { drop(2 ) }
813
813
df.select { dropLast(2 ) }
814
814
815
+ // find the first column satisfying the condition
816
+ df.select { first { it.name().startsWith(" year" ) } }
817
+
818
+ // find the last column inside a column group satisfying the condition
819
+ df.select {
820
+ group(" name" ).last { it.name().endsWith(" Name" ) }
821
+ }
822
+
815
823
// depth-first-search traversal of all columns, excluding ColumnGroups from result
816
824
df.select { allDfs() }
817
825
Original file line number Diff line number Diff line change @@ -206,6 +206,14 @@ df.select { takeLast(2) }
206
206
df.select { drop(2 ) }
207
207
df.select { dropLast(2 ) }
208
208
209
+ // find the first column satisfying the condition
210
+ df.select { first { it.name().startsWith(" year" ) } }
211
+
212
+ // find the last column inside a column group satisfying the condition
213
+ df.select {
214
+ group(" name" ).last { it.name().endsWith(" Name" ) }
215
+ }
216
+
209
217
// depth-first-search traversal of all columns, excluding ColumnGroups from result
210
218
df.select { allDfs() }
211
219
You can’t perform that action at this time.
0 commit comments