@@ -8,6 +8,7 @@ import org.jetbrains.kotlinx.dataframe.DataFrame
88import org.jetbrains.kotlinx.dataframe.DataRow
99import org.jetbrains.kotlinx.dataframe.RowExpression
1010import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
11+ import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval
1112import org.jetbrains.kotlinx.dataframe.annotations.DataSchema
1213import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
1314import org.jetbrains.kotlinx.dataframe.impl.columnName
@@ -20,8 +21,10 @@ import kotlin.experimental.ExperimentalTypeInference
2021import kotlin.reflect.KProperty
2122import kotlin.reflect.KType
2223
24+ @CandidateForRemoval
2325public fun AnyRow.isEmpty (): Boolean = owner.columns().all { it[index] == null }
2426
27+ @CandidateForRemoval
2528public fun AnyRow.isNotEmpty (): Boolean = ! isEmpty()
2629
2730public inline fun <reified R > AnyRow.valuesOf (): List <R > = values().filterIsInstance<R >()
@@ -168,12 +171,16 @@ public fun AnyRow.columnNames(): List<String> = df().columnNames()
168171
169172public fun AnyRow.columnTypes (): List <KType > = df().columnTypes()
170173
174+ @CandidateForRemoval
171175public fun <T > DataRow<T>.getRow (index : Int ): DataRow <T > = getRowOrNull(index)!!
172176
177+ @CandidateForRemoval
173178public fun <T > DataRow<T>.getRows (indices : Iterable <Int >): DataFrame <T > = df().getRows(indices)
174179
180+ @CandidateForRemoval
175181public fun <T > DataRow<T>.getRows (indices : IntRange ): DataFrame <T > = df().getRows(indices)
176182
183+ @CandidateForRemoval
177184public fun <T > DataRow<T>.getRowOrNull (index : Int ): DataRow <T >? {
178185 val df = df()
179186 return if (index >= 0 && index < df.nrow) df[index] else null
0 commit comments