-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Assume we have the following dataframe:
val df = dataFrameOf(
"name" to columnOf("Alice", "Bob", "Charlie"),
"age" to columnOf(15, 20, 25),
)Calling
df.groupBy { age }.updateGroups { it }.first().values()either in notebooks or outside them causes an exception. In notebooks this exception is formulated in the following way:
java.lang.IllegalStateException: Can not insert column
agebecause column with this path already exists in DataFrame
If we remove age from every group:
df.groupBy { age }.updateGroups { it.remove { age } }.first().values()the exception does not occur.
Notebooks
In notebooks, a similar problem occurs even without using values(). That is, calling:
df.groupBy { age }.updateGroups { it }.first()causes:
The problem is found in one of the loaded libraries: check library renderers
java.lang.IllegalStateException: Can not insert columnagebecause column with this path already exists in DataFrame
org.jetbrains.kotlinx.jupyter.exceptions.ReplLibraryException: The problem is found in one of the loaded libraries: check library renderers
If we add concat(), the exception does not occur:
df.groupBy { age }.updateGroups { it }.first().concat()