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 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
32
32
import org.jetbrains.kotlinx.dataframe.impl.columns.forceResolve
33
33
import org.jetbrains.kotlinx.dataframe.impl.columns.unbox
34
34
import org.jetbrains.kotlinx.dataframe.size
35
+ import org.jetbrains.kotlinx.dataframe.util.DATAFRAME_OF_WITH_VALUES
35
36
import kotlin.random.Random
36
37
import kotlin.random.nextInt
37
38
import kotlin.reflect.KProperty
@@ -361,6 +362,7 @@ public fun dataFrameOf(header: Iterable<String>): DataFrameBuilder = DataFrameBu
361
362
public fun dataFrameOf (vararg columns : Pair <String , List <Any ?>>): DataFrame <* > =
362
363
columns.map { it.second.toColumn(it.first, Infer .Type ) }.toDataFrame()
363
364
365
+ @Deprecated(DATAFRAME_OF_WITH_VALUES , ReplaceWith (" dataFrameOf(header).withValues(values)" ))
364
366
public fun dataFrameOf (header : Iterable <String >, values : Iterable <Any ?>): DataFrame <* > =
365
367
dataFrameOf(header).withValues(values)
366
368
Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ internal const val TO_CSV_REPLACE = "this.toCsvStr()"
163
163
internal const val SPLIT_STR =
164
164
" Please explicitly specify how the String should be split. This shortcut will be removed in version 1.1.0"
165
165
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
+
166
169
// endregion
167
170
168
171
// region keep across releases
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class ImageSerializationTests {
60
60
images : List <BufferedImage >,
61
61
encodingOptions : Base64ImageEncodingOptions ? ,
62
62
): JsonObject {
63
- val df = dataFrameOf(listOf ( " imgs" ), images)
63
+ val df = dataFrameOf(" imgs" to images)
64
64
val jsonStr = df.toJsonWithMetadata(
65
65
20 ,
66
66
nestedRowLimit = 20 ,
You can’t perform that action at this time.
0 commit comments