-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Description
When I run df.describe() I would like to group columns of like types together. When I try and click the sort button on the dataframe I get this error:
Column 'type' has type 'kotlin.Any' that is not Comparable java.lang.RuntimeException: Column 'type' has type 'kotlin.Any' that is not Comparable at org.jetbrains.kotlinx.dataframe.impl.columns.UtilsKt.assertIsComparable(Utils.kt:98) at org.jetbrains.kotlinx.dataframe.impl.api.SortKt.createComparator(sort.kt:60) at org.jetbrains.kotlinx.dataframe.impl.api.SortKt.sortByImpl(sort.kt:49) at
It would seem to me that sorting based on toString() when a Comparable is not available.
I was able to get around the problem with this code:
df.describe().sortWith { r1, r2 -> r1["type"].toString().compareTo(r2["type"].toString()) }[0]["type"]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working