Skip to content

Commit cc307f1

Browse files
committed
Mark some functions as CandidateForRemoval
1 parent 7988560 commit cc307f1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataRowApi.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.jetbrains.kotlinx.dataframe.DataFrame
88
import org.jetbrains.kotlinx.dataframe.DataRow
99
import org.jetbrains.kotlinx.dataframe.RowExpression
1010
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
11+
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval
1112
import org.jetbrains.kotlinx.dataframe.annotations.DataSchema
1213
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
1314
import org.jetbrains.kotlinx.dataframe.impl.columnName
@@ -20,8 +21,10 @@ import kotlin.experimental.ExperimentalTypeInference
2021
import kotlin.reflect.KProperty
2122
import kotlin.reflect.KType
2223

24+
@CandidateForRemoval
2325
public fun AnyRow.isEmpty(): Boolean = owner.columns().all { it[index] == null }
2426

27+
@CandidateForRemoval
2528
public fun AnyRow.isNotEmpty(): Boolean = !isEmpty()
2629

2730
public inline fun <reified R> AnyRow.valuesOf(): List<R> = values().filterIsInstance<R>()
@@ -166,12 +169,16 @@ public fun AnyRow.columnNames(): List<String> = df().columnNames()
166169

167170
public fun AnyRow.columnTypes(): List<KType> = df().columnTypes()
168171

172+
@CandidateForRemoval
169173
public fun <T> DataRow<T>.getRow(index: Int): DataRow<T> = getRowOrNull(index)!!
170174

175+
@CandidateForRemoval
171176
public fun <T> DataRow<T>.getRows(indices: Iterable<Int>): DataFrame<T> = df().getRows(indices)
172177

178+
@CandidateForRemoval
173179
public fun <T> DataRow<T>.getRows(indices: IntRange): DataFrame<T> = df().getRows(indices)
174180

181+
@CandidateForRemoval
175182
public fun <T> DataRow<T>.getRowOrNull(index: Int): DataRow<T>? {
176183
val df = df()
177184
return if (index >= 0 && index < df.nrow) df[index] else null
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.DataFrame
4-
4+
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval
55
// region DataFrame
66

7+
@CandidateForRemoval
78
public fun <T> DataFrame<T>.copy(): DataFrame<T> = columns().toDataFrame().cast()
89

910
// endregion

0 commit comments

Comments
 (0)