Skip to content

Commit 4ec98c4

Browse files
committed
hotfix deprecation error
1 parent 9adfcee commit 4ec98c4

File tree

3 files changed

+17
-1
lines changed
  • core/generated-sources/src
  • examples/idea-examples/youtube/src/main/kotlin/org/jetbrains/kotlinx/dataframe/examples/youtube

3 files changed

+17
-1
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/toDataFrame.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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")
236246
public inline fun <reified U : UByte?> Iterable<U>.toDataFrame(): DataFrame<ValueProperty<U>> = toDataFrame {
237247
ValueProperty<U>::value from { it }

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/toDataFrame.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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

examples/idea-examples/youtube/src/main/kotlin/org/jetbrains/kotlinx/dataframe/examples/youtube/youtube.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 }

0 commit comments

Comments
 (0)