Skip to content

Commit da07f3b

Browse files
committed
Merge branch 'master' into median
2 parents 8effc33 + 7990082 commit da07f3b

File tree

104 files changed

+2941
-1571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2941
-1571
lines changed

core/api/core.api

+32-12
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ public final class org/jetbrains/kotlinx/dataframe/api/AddDsl : org/jetbrains/ko
320320
public fun getColumnOrNull (Lkotlin/reflect/KProperty;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
321321
public fun getColumnOrNull (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnPath;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
322322
public fun getColumnOrNull (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
323+
public final fun getColumns ()Ljava/util/List;
323324
public final fun getDf ()Lorg/jetbrains/kotlinx/dataframe/DataFrame;
324325
public final fun group (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
325326
public final fun group (Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/api/AddGroup;
@@ -598,8 +599,14 @@ public abstract interface class org/jetbrains/kotlinx/dataframe/api/AllExceptCol
598599
public final class org/jetbrains/kotlinx/dataframe/api/AllKt {
599600
public static final fun all (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Lkotlin/jvm/functions/Function1;)Z
600601
public static final fun all (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/jvm/functions/Function2;)Z
602+
public static final fun allAfterInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
603+
public static final fun allBeforeInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
604+
public static final fun allColumnsInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Z)Lorg/jetbrains/kotlinx/dataframe/impl/columns/TransformableColumnSet;
605+
public static synthetic fun allColumnsInternal$default (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/impl/columns/TransformableColumnSet;
606+
public static final fun allFromInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
601607
public static final fun allNA (Lorg/jetbrains/kotlinx/dataframe/DataRow;)Z
602608
public static final fun allNulls (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Z
609+
public static final fun allUpToInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
603610
}
604611

605612
public abstract interface class org/jetbrains/kotlinx/dataframe/api/AndColumnsSelectionDsl {
@@ -1029,6 +1036,10 @@ public abstract interface class org/jetbrains/kotlinx/dataframe/api/ColsInGroups
10291036
public abstract interface class org/jetbrains/kotlinx/dataframe/api/ColsInGroupsColumnsSelectionDsl$Grammar$PlainDslName {
10301037
}
10311038

1039+
public final class org/jetbrains/kotlinx/dataframe/api/ColsKt {
1040+
public static final fun colsInternal (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/impl/columns/TransformableColumnSet;
1041+
}
1042+
10321043
public abstract interface class org/jetbrains/kotlinx/dataframe/api/ColsOfColumnsSelectionDsl {
10331044
public fun colsOf (Ljava/lang/String;Lkotlin/reflect/KType;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
10341045
public fun colsOf (Lkotlin/reflect/KProperty;Lkotlin/reflect/KType;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
@@ -1939,17 +1950,6 @@ public final class org/jetbrains/kotlinx/dataframe/api/DescribeKt {
19391950
public static final fun describe (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
19401951
}
19411952

1942-
public final class org/jetbrains/kotlinx/dataframe/api/DigitizeKt {
1943-
public static final fun digitize (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Ljava/util/List;Lkotlin/reflect/KClass;Z)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1944-
public static final fun digitize (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Ljava/util/List;Z)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1945-
public static final fun digitize (Lorg/jetbrains/kotlinx/dataframe/DataColumn;[IZ)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1946-
public static final fun digitize (Lorg/jetbrains/kotlinx/dataframe/DataColumn;[Ljava/lang/Comparable;Z)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1947-
public static synthetic fun digitize$default (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Ljava/util/List;Lkotlin/reflect/KClass;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1948-
public static synthetic fun digitize$default (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Ljava/util/List;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1949-
public static synthetic fun digitize$default (Lorg/jetbrains/kotlinx/dataframe/DataColumn;[IZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1950-
public static synthetic fun digitize$default (Lorg/jetbrains/kotlinx/dataframe/DataColumn;[Ljava/lang/Comparable;ZILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
1951-
}
1952-
19531953
public abstract interface class org/jetbrains/kotlinx/dataframe/api/DistinctColumnsSelectionDsl {
19541954
public fun distinct (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnSet;
19551955
}
@@ -3898,6 +3898,8 @@ public final class org/jetbrains/kotlinx/dataframe/api/SortKt {
38983898
public final class org/jetbrains/kotlinx/dataframe/api/Split {
38993899
public fun <init> (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/jvm/functions/Function2;)V
39003900
public final fun cast ()Lorg/jetbrains/kotlinx/dataframe/api/Split;
3901+
public final fun getColumns ()Lkotlin/jvm/functions/Function2;
3902+
public final fun getDf ()Lorg/jetbrains/kotlinx/dataframe/DataFrame;
39013903
public fun toString ()Ljava/lang/String;
39023904
}
39033905

@@ -4326,10 +4328,11 @@ public final class org/jetbrains/kotlinx/dataframe/api/TypeConversionsKt {
43264328
}
43274329

43284330
public final class org/jetbrains/kotlinx/dataframe/api/UnfoldKt {
4329-
public static final fun unfold (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
43304331
public static final fun unfold (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Ljava/lang/String;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
4332+
public static final fun unfold (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lkotlin/reflect/KCallable;ILkotlin/jvm/functions/Function2;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
43314333
public static final fun unfold (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lkotlin/reflect/KProperty;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
43324334
public static final fun unfold (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
4335+
public static synthetic fun unfold$default (Lorg/jetbrains/kotlinx/dataframe/DataFrame;[Lkotlin/reflect/KCallable;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
43334336
}
43344337

43354338
public final class org/jetbrains/kotlinx/dataframe/api/UngroupKt {
@@ -4862,6 +4865,10 @@ public abstract interface class org/jetbrains/kotlinx/dataframe/columns/BaseColu
48624865
public abstract fun values ()Ljava/lang/Iterable;
48634866
}
48644867

4868+
public final class org/jetbrains/kotlinx/dataframe/columns/BaseColumnKt {
4869+
public static final fun getValues (Lorg/jetbrains/kotlinx/dataframe/columns/BaseColumn;)Ljava/lang/Iterable;
4870+
}
4871+
48654872
public abstract interface class org/jetbrains/kotlinx/dataframe/columns/ColumnAccessor : org/jetbrains/kotlinx/dataframe/columns/ColumnReference {
48664873
public abstract fun get (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnReference;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnAccessor;
48674874
public fun getValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lorg/jetbrains/kotlinx/dataframe/columns/ColumnAccessor;
@@ -5573,6 +5580,14 @@ public final class org/jetbrains/kotlinx/dataframe/impl/api/ConvertToKt {
55735580
public static synthetic fun convertToImpl$default (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/reflect/KType;ZLorg/jetbrains/kotlinx/dataframe/api/ExcessiveColumns;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
55745581
}
55755582

5583+
public final class org/jetbrains/kotlinx/dataframe/impl/api/DuplicateKt {
5584+
public static final fun duplicateRowsImpl (Lorg/jetbrains/kotlinx/dataframe/DataFrame;ILjava/lang/Iterable;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
5585+
}
5586+
5587+
public final class org/jetbrains/kotlinx/dataframe/impl/api/GroupByKt {
5588+
public static final fun groupByImpl (Lorg/jetbrains/kotlinx/dataframe/DataFrame;ZLkotlin/jvm/functions/Function2;)Lorg/jetbrains/kotlinx/dataframe/api/GroupBy;
5589+
}
5590+
55765591
public final class org/jetbrains/kotlinx/dataframe/impl/api/InsertKt {
55775592
public static final fun insertImpl (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lorg/jetbrains/kotlinx/dataframe/columns/ColumnPath;Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
55785593
}
@@ -5597,6 +5612,10 @@ public final class org/jetbrains/kotlinx/dataframe/impl/api/ToSequenceKt {
55975612
public static final fun toSequenceImpl (Lorg/jetbrains/kotlinx/dataframe/DataFrame;Lkotlin/reflect/KType;)Lkotlin/sequences/Sequence;
55985613
}
55995614

5615+
public final class org/jetbrains/kotlinx/dataframe/impl/api/UnfoldKt {
5616+
public static final fun unfoldImpl (Lorg/jetbrains/kotlinx/dataframe/DataColumn;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/DataColumn;
5617+
}
5618+
56005619
public final class org/jetbrains/kotlinx/dataframe/impl/api/UpdateKt {
56015620
public static final fun updateImpl (Lorg/jetbrains/kotlinx/dataframe/api/Update;Lkotlin/jvm/functions/Function3;)Lorg/jetbrains/kotlinx/dataframe/DataFrame;
56025621
}
@@ -5691,6 +5710,7 @@ public abstract interface class org/jetbrains/kotlinx/dataframe/impl/columns/Tra
56915710

56925711
public final class org/jetbrains/kotlinx/dataframe/impl/columns/UtilsKt {
56935712
public static final fun asAnyFrameColumn (Lorg/jetbrains/kotlinx/dataframe/DataColumn;)Lorg/jetbrains/kotlinx/dataframe/columns/FrameColumn;
5713+
public static final fun transform (Lorg/jetbrains/kotlinx/dataframe/columns/ColumnsResolver;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlinx/dataframe/impl/columns/TransformableColumnSet;
56945714
}
56955715

56965716
public final class org/jetbrains/kotlinx/dataframe/impl/io/FastDoubleParser {

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ internal interface DiffOrNullDocs
113113
*/
114114
@OptIn(ExperimentalTypeInference::class)
115115
@OverloadResolutionByLambdaReturnType
116-
public fun <T> DataRow<T>.diff(firstRowResult: Double, expression: RowExpression<T, Double>): Double =
116+
public inline fun <T> DataRow<T>.diff(firstRowResult: Double, expression: RowExpression<T, Double>): Double =
117117
prev()?.let { p -> expression(this, this) - expression(p, p) }
118118
?: firstRowResult
119119

@@ -125,7 +125,7 @@ public fun <T> DataRow<T>.diff(firstRowResult: Double, expression: RowExpression
125125
@OptIn(ExperimentalTypeInference::class)
126126
@OverloadResolutionByLambdaReturnType
127127
// required to resolve `diff(0) { intValue }`
128-
public fun <T> DataRow<T>.diff(firstRowResult: Int, expression: RowExpression<T, Int>): Int =
128+
public inline fun <T> DataRow<T>.diff(firstRowResult: Int, expression: RowExpression<T, Int>): Int =
129129
prev()?.let { p -> expression(this, this) - expression(p, p) }
130130
?: firstRowResult
131131

@@ -134,7 +134,7 @@ public fun <T> DataRow<T>.diff(firstRowResult: Int, expression: RowExpression<T,
134134
*
135135
* @return [firstRowValue] for the first row; difference between expression computed for current and previous row for the following rows
136136
*/
137-
public fun <T> DataRow<T>.diff(firstRowResult: Long, expression: RowExpression<T, Long>): Long =
137+
public inline fun <T> DataRow<T>.diff(firstRowResult: Long, expression: RowExpression<T, Long>): Long =
138138
prev()?.let { p -> expression(this, this) - expression(p, p) }
139139
?: firstRowResult
140140

@@ -143,7 +143,7 @@ public fun <T> DataRow<T>.diff(firstRowResult: Long, expression: RowExpression<T
143143
*
144144
* @return [firstRowValue] for the first row; difference between expression computed for current and previous row for the following rows
145145
*/
146-
public fun <T> DataRow<T>.diff(firstRowResult: Float, expression: RowExpression<T, Float>): Float =
146+
public inline fun <T> DataRow<T>.diff(firstRowResult: Float, expression: RowExpression<T, Float>): Float =
147147
prev()?.let { p -> expression(this, this) - expression(p, p) }
148148
?: firstRowResult
149149

@@ -154,31 +154,31 @@ public fun <T> DataRow<T>.diff(firstRowResult: Float, expression: RowExpression<
154154
*/
155155
@OptIn(ExperimentalTypeInference::class)
156156
@OverloadResolutionByLambdaReturnType
157-
public fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Double>): Double? =
157+
public inline fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Double>): Double? =
158158
prev()?.let { p -> expression(this, this) - expression(p, p) }
159159

160160
/**
161161
* Calculates the difference between the results of a row expression computed on the current and previous DataRow.
162162
*
163163
* @return null for the first row; difference between expression computed for current and previous row for the following rows
164164
*/
165-
public fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Int>): Int? =
165+
public inline fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Int>): Int? =
166166
prev()?.let { p -> expression(this, this) - expression(p, p) }
167167

168168
/**
169169
* Calculates the difference between the results of a row expression computed on the current and previous DataRow.
170170
*
171171
* @return null for the first row; difference between expression computed for current and previous row for the following rows
172172
*/
173-
public fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Long>): Long? =
173+
public inline fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Long>): Long? =
174174
prev()?.let { p -> expression(this, this) - expression(p, p) }
175175

176176
/**
177177
* Calculates the difference between the results of a row expression computed on the current and previous DataRow.
178178
*
179179
* @return null for the first row; difference between expression computed for current and previous row for the following rows
180180
*/
181-
public fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Float>): Float? =
181+
public inline fun <T> DataRow<T>.diffOrNull(expression: RowExpression<T, Float>): Float? =
182182
prev()?.let { p -> expression(this, this) - expression(p, p) }
183183

184184
public fun AnyRow.columnsCount(): Int = df().ncol
@@ -221,7 +221,7 @@ public fun <T> DataRow<T>.relative(relativeIndices: IntRange): DataFrame<T> =
221221
(relativeIndices.first + index).coerceIn(df().indices)..(relativeIndices.last + index).coerceIn(df().indices),
222222
)
223223

224-
public fun <T> DataRow<T>.movingAverage(k: Int, expression: RowExpression<T, Number>): Double {
224+
public inline fun <T> DataRow<T>.movingAverage(k: Int, expression: RowExpression<T, Number>): Double {
225225
var count = 0
226226
return backwardIterable().take(k).sumOf {
227227
count++
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
@PublishedApi
4-
internal val skipNaN_default: Boolean = false
4+
internal val skipNaNDefault: Boolean = false
55

6+
/**
7+
* Default delta degrees of freedom for the standard deviation (std).
8+
*
9+
* The default is set to `1`,
10+
* meaning DataFrame uses [Bessel’s correction](https://en.wikipedia.org/wiki/Bessel%27s_correction) to calculate the
11+
* "unbiased sample standard deviation" by default.
12+
* This is also the standard in languages like R.
13+
*
14+
* This is different from the "population standard deviation" (where `ddof = 0`),
15+
* which is used in libraries like Numpy.
16+
*/
617
@PublishedApi
7-
internal val ddof_default: Int = 1
18+
internal val ddofDefault: Int = 1

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/add.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ public class AddDsl<T>(
166166
ColumnSelectionDsl<T> {
167167

168168
// TODO: support adding column into path
169-
internal val columns = mutableListOf<AnyCol>()
169+
@PublishedApi
170+
internal val columns: MutableList<AnyCol> = mutableListOf<AnyCol>()
170171

171172
public fun add(column: AnyColumnReference): Boolean = columns.add(column.resolveSingle(df)!!.data)
172173

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/all.kt

+10-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public fun AnyRow.allNA(): Boolean = owner.columns().all { it[index()].isNA }
4646
// region DataFrame
4747

4848
/** Returns `true` if all [rows] match the given [predicate] or [rows] is empty. */
49-
public fun <T> DataFrame<T>.all(predicate: RowFilter<T>): Boolean = rows().all { predicate(it, it) }
49+
public inline fun <T> DataFrame<T>.all(predicate: RowFilter<T>): Boolean = rows().all { predicate(it, it) }
5050

5151
// endregion
5252

@@ -8093,6 +8093,7 @@ public interface AllColumnsSelectionDsl<out _UNUSED> {
80938093
* else it simply returns a [(transformable) ColumnSet][TransformableColumnSet] from [this]
80948094
* (like when [this] is a [ColumnSet]).
80958095
*/
8096+
@PublishedApi
80968097
internal fun ColumnsResolver<*>.allColumnsInternal(removePaths: Boolean = false): TransformableColumnSet<*> =
80978098
transform { cols ->
80988099
if (this is SingleColumn<*> && cols.singleOrNull()?.isColumnGroup() == true) {
@@ -8114,7 +8115,8 @@ internal fun ColumnsResolver<*>.allColumnsInternal(removePaths: Boolean = false)
81148115
* @param colByPredicate a function that takes a ColumnWithPath and returns true if the column matches the predicate, false otherwise
81158116
* @return a new ColumnSet containing all columns after the first column that matches the given predicate
81168117
*/
8117-
internal fun ColumnsResolver<*>.allAfterInternal(colByPredicate: ColumnFilter<*>): ColumnSet<*> {
8118+
@PublishedApi
8119+
internal inline fun ColumnsResolver<*>.allAfterInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*> {
81188120
var take = false
81198121
return colsInternal {
81208122
if (take) {
@@ -8132,7 +8134,8 @@ internal fun ColumnsResolver<*>.allAfterInternal(colByPredicate: ColumnFilter<*>
81328134
* @param colByPredicate the predicate used to determine if a column should be included in the resulting set
81338135
* @return a column set containing all columns that satisfy the predicate
81348136
*/
8135-
internal fun ColumnsResolver<*>.allFromInternal(colByPredicate: ColumnFilter<*>): ColumnSet<*> {
8137+
@PublishedApi
8138+
internal inline fun ColumnsResolver<*>.allFromInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*> {
81368139
var take = false
81378140
return colsInternal {
81388141
if (take) {
@@ -8150,7 +8153,8 @@ internal fun ColumnsResolver<*>.allFromInternal(colByPredicate: ColumnFilter<*>)
81508153
* @param colByPredicate the predicate function used to determine if a column should be included in the returned ColumnSet
81518154
* @return a new ColumnSet containing all columns that come before the first column that satisfies the given predicate
81528155
*/
8153-
internal fun ColumnsResolver<*>.allBeforeInternal(colByPredicate: ColumnFilter<*>): ColumnSet<*> {
8156+
@PublishedApi
8157+
internal inline fun ColumnsResolver<*>.allBeforeInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*> {
81548158
var take = true
81558159
return colsInternal {
81568160
if (!take) {
@@ -8168,7 +8172,8 @@ internal fun ColumnsResolver<*>.allBeforeInternal(colByPredicate: ColumnFilter<*
81688172
* @param colByPredicate a predicate function that takes a ColumnWithPath and returns true if the column satisfies the desired condition.
81698173
* @return a ColumnSet containing all columns up to the first column that satisfies the given predicate.
81708174
*/
8171-
internal fun ColumnsResolver<*>.allUpToInternal(colByPredicate: ColumnFilter<*>): ColumnSet<*> {
8175+
@PublishedApi
8176+
internal inline fun ColumnsResolver<*>.allUpToInternal(crossinline colByPredicate: ColumnFilter<*>): ColumnSet<*> {
81728177
var take = true
81738178
return colsInternal {
81748179
if (!take) {

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/any.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ public fun <T> DataColumn<T>.any(predicate: Predicate<T>): Boolean = values.any(
1414

1515
// region DataFrame
1616

17-
public fun <T> DataFrame<T>.any(predicate: RowFilter<T>): Boolean = rows().any { predicate(it, it) }
17+
public inline fun <T> DataFrame<T>.any(predicate: RowFilter<T>): Boolean = rows().any { predicate(it, it) }
1818

1919
// endregion

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/associate.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import org.jetbrains.kotlinx.dataframe.RowExpression
66

77
// region DataFrame
88

9-
public fun <T, V> DataFrame<T>.associateBy(transform: RowExpression<T, V>): Map<V, DataRow<T>> =
9+
public inline fun <T, V> DataFrame<T>.associateBy(transform: RowExpression<T, V>): Map<V, DataRow<T>> =
1010
rows().associateBy { transform(it, it) }
1111

12-
public fun <T, K, V> DataFrame<T>.associate(transform: RowExpression<T, Pair<K, V>>): Map<K, V> =
12+
public inline fun <T, K, V> DataFrame<T>.associate(transform: RowExpression<T, Pair<K, V>>): Map<K, V> =
1313
rows().associate { transform(it, it) }
1414

1515
// endregion

0 commit comments

Comments
 (0)