File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe
dataframe-json/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.createComputedColumnReferenc
3232import org.jetbrains.kotlinx.dataframe.impl.columns.forceResolve
3333import org.jetbrains.kotlinx.dataframe.impl.columns.unbox
3434import org.jetbrains.kotlinx.dataframe.size
35+ import org.jetbrains.kotlinx.dataframe.util.DATAFRAME_OF_WITH_VALUES
3536import kotlin.random.Random
3637import kotlin.random.nextInt
3738import kotlin.reflect.KProperty
@@ -361,6 +362,7 @@ public fun dataFrameOf(header: Iterable<String>): DataFrameBuilder = DataFrameBu
361362public fun dataFrameOf (vararg columns : Pair <String , List <Any ?>>): DataFrame <* > =
362363 columns.map { it.second.toColumn(it.first, Infer .Type ) }.toDataFrame()
363364
365+ @Deprecated(DATAFRAME_OF_WITH_VALUES , ReplaceWith (" dataFrameOf(header).withValues(values)" ))
364366public fun dataFrameOf (header : Iterable <String >, values : Iterable <Any ?>): DataFrame <* > =
365367 dataFrameOf(header).withValues(values)
366368
Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ internal const val TO_CSV_REPLACE = "this.toCsvStr()"
163163internal const val SPLIT_STR =
164164 " Please explicitly specify how the String should be split. This shortcut will be removed in version 1.1.0"
165165
166+ internal const val DATAFRAME_OF_WITH_VALUES =
167+ " Deprecated in favor of dataFrameOf(names).withValues(values). Will be error in 1.1.0"
168+
166169// endregion
167170
168171// region keep across releases
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class ImageSerializationTests {
6060 images : List <BufferedImage >,
6161 encodingOptions : Base64ImageEncodingOptions ? ,
6262 ): JsonObject {
63- val df = dataFrameOf(listOf ( " imgs" ), images)
63+ val df = dataFrameOf(" imgs" to images)
6464 val jsonStr = df.toJsonWithMetadata(
6565 20 ,
6666 nestedRowLimit = 20 ,
You can’t perform that action at this time.
0 commit comments