File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
core/generated-sources/src
main/kotlin/org/jetbrains/kotlinx/dataframe/api
test/kotlin/org/jetbrains/kotlinx/dataframe/api
examples/idea-examples/youtube/src/main/kotlin/org/jetbrains/kotlinx/dataframe/examples/youtube Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,16 @@ public inline fun <reified B : Boolean?> Iterable<B>.toDataFrame(): DataFrame<Va
232
232
ValueProperty <B >::value from { it }
233
233
}.cast()
234
234
235
+ @JvmName(" toDataFrameFloat" )
236
+ public inline fun <reified F : Float ? > Iterable<F>.toDataFrame (): DataFrame <ValueProperty <F >> = toDataFrame {
237
+ ValueProperty <F >::value from { it }
238
+ }.cast()
239
+
240
+ @JvmName(" toDataFrameDouble" )
241
+ public inline fun <reified D : Double ? > Iterable<D>.toDataFrame (): DataFrame <ValueProperty <D >> = toDataFrame {
242
+ ValueProperty <D >::value from { it }
243
+ }.cast()
244
+
235
245
@JvmName(" toDataFrameUByte" )
236
246
public inline fun <reified U : UByte ? > Iterable<U>.toDataFrame (): DataFrame <ValueProperty <U >> = toDataFrame {
237
247
ValueProperty <U >::value from { it }
Original file line number Diff line number Diff line change @@ -223,6 +223,12 @@ class CreateDataFrameTests {
223
223
224
224
val int = listOf (1 , 2 , 3 )
225
225
int.toDataFrame().alsoDebug() shouldBe dataFrameOf(" value" )(* int.toTypedArray())
226
+
227
+ val doubles = listOf (1.0 , 2.0 , 3.0 )
228
+ doubles.toDataFrame().alsoDebug() shouldBe dataFrameOf(" value" )(* doubles.toTypedArray())
229
+
230
+ val floats = listOf (1.0f , 2.0f , 3.0f )
231
+ floats.toDataFrame().alsoDebug() shouldBe dataFrameOf(" value" )(* floats.toTypedArray())
226
232
}
227
233
228
234
@Ignore
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ fun main() {
69
69
load(" videos?part=statistics&id=$ids " ).cast<StatisticsResponse >()
70
70
}.asColumnGroup()
71
71
.items.concat()
72
- .select { id and statistics.all () }
72
+ .select { id and statistics.allCols () }
73
73
.parse()
74
74
75
75
val withStat = videos.join(stats) { videoId match right.id }
You can’t perform that action at this time.
0 commit comments