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
232232 ValueProperty <B >::value from { it }
233233}.cast()
234234
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+
235245@JvmName(" toDataFrameUByte" )
236246public inline fun <reified U : UByte ? > Iterable<U>.toDataFrame (): DataFrame <ValueProperty <U >> = toDataFrame {
237247 ValueProperty <U >::value from { it }
Original file line number Diff line number Diff line change @@ -223,6 +223,12 @@ class CreateDataFrameTests {
223223
224224 val int = listOf (1 , 2 , 3 )
225225 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())
226232 }
227233
228234 @Ignore
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ fun main() {
6969 load(" videos?part=statistics&id=$ids " ).cast<StatisticsResponse >()
7070 }.asColumnGroup()
7171 .items.concat()
72- .select { id and statistics.all () }
72+ .select { id and statistics.allCols () }
7373 .parse()
7474
7575 val withStat = videos.join(stats) { videoId match right.id }
You can’t perform that action at this time.
0 commit comments