@@ -24,6 +24,10 @@ import org.jetbrains.kotlinx.dataframe.exceptions.DuplicateColumnNamesException
24
24
import org.jetbrains.kotlinx.dataframe.exceptions.UnequalColumnSizesException
25
25
import org.jetbrains.kotlinx.dataframe.impl.api.insertImpl
26
26
import org.jetbrains.kotlinx.dataframe.impl.columns.resolveSingle
27
+ import org.jetbrains.kotlinx.dataframe.util.ADD_VARARG_COLUMNS
28
+ import org.jetbrains.kotlinx.dataframe.util.ADD_VARARG_COLUMNS_REPLACE
29
+ import org.jetbrains.kotlinx.dataframe.util.ADD_VARARG_FRAMES
30
+ import org.jetbrains.kotlinx.dataframe.util.ADD_VARARG_FRAMES_REPLACE
27
31
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
28
32
import kotlin.reflect.KProperty
29
33
@@ -41,8 +45,27 @@ import kotlin.reflect.KProperty
41
45
* @throws [UnequalColumnSizesException] if columns in an expected result have different sizes.
42
46
* @return new [DataFrame] with added columns.
43
47
*/
48
+ @Deprecated(
49
+ message = ADD_VARARG_COLUMNS ,
50
+ replaceWith = ReplaceWith (ADD_VARARG_COLUMNS_REPLACE ),
51
+ level = DeprecationLevel .WARNING ,
52
+ )
44
53
public fun <T > DataFrame<T>.add (vararg columns : AnyBaseCol ): DataFrame <T > = addAll(columns.asIterable())
45
54
55
+ /* *
56
+ * Adds new [columns] to the end of this [DataFrame] (at the top level).
57
+ *
58
+ * Returns a new [DataFrame] with the new [columns] appended to the original list of [DataFrame.columns].
59
+ *
60
+ * For more information: [See `add` on the documentation website.](https://kotlin.github.io/dataframe/add.html).
61
+ *
62
+ * @param columns columns to add.
63
+ * @throws [DuplicateColumnNamesException] if columns in an expected result have repeated names.
64
+ * @throws [UnequalColumnSizesException] if columns in an expected result have different sizes.
65
+ * @return new [DataFrame] with added columns.
66
+ */
67
+ public fun <T > DataFrame<T>.addAll (vararg columns : AnyBaseCol ): DataFrame <T > = addAll(columns.asIterable())
68
+
46
69
/* *
47
70
* Adds new [columns] to the end of this [DataFrame] (at the top level).
48
71
*
@@ -71,8 +94,28 @@ public fun <T> DataFrame<T>.addAll(columns: Iterable<AnyBaseCol>): DataFrame<T>
71
94
* @throws [UnequalColumnSizesException] if columns in an expected result have different sizes.
72
95
* @return new [DataFrame] with added columns.
73
96
*/
97
+ @Deprecated(
98
+ message = ADD_VARARG_FRAMES ,
99
+ replaceWith = ReplaceWith (ADD_VARARG_FRAMES_REPLACE ),
100
+ level = DeprecationLevel .WARNING ,
101
+ )
74
102
public fun <T > DataFrame<T>.add (vararg dataFrames : AnyFrame ): DataFrame <T > = addAll(dataFrames.asIterable())
75
103
104
+ /* *
105
+ * Adds all columns from the given [dataFrames] to the end of this [DataFrame] (at the top level).
106
+ *
107
+ * Returns a new [DataFrame] with the columns from the specified
108
+ * [dataFrames] appended to the original list of [DataFrame.columns].
109
+ *
110
+ * For more information: [See `add` on the documentation website.](https://kotlin.github.io/dataframe/add.html).
111
+ *
112
+ * @param dataFrames dataFrames to get columns from.
113
+ * @throws [DuplicateColumnNamesException] if columns in an expected result have repeated names.
114
+ * @throws [UnequalColumnSizesException] if columns in an expected result have different sizes.
115
+ * @return new [DataFrame] with added columns.
116
+ */
117
+ public fun <T > DataFrame<T>.addAll (vararg dataFrames : AnyFrame ): DataFrame <T > = addAll(dataFrames.asIterable())
118
+
76
119
/* *
77
120
* Adds all columns from the given [dataFrames] to the end of this [DataFrame] (at the top level).
78
121
*
0 commit comments