dataframe
dataframe copied to clipboard
Ability to address Frame columns in DF via `colsAtAnyDepth` functionality
See the example below
class P(val x: Double, val y: Double)
class V(val w: Int, val p: List<P>)
val a = List(2) { V (1, List<P>(5){ P(2.0, 2.0) })}
val df = a.toDataFrame(maxDepth = 2)
df.update { dfsOf<Double>() }.with { it*2 } // this statement does nothing
Currently column selectors in all DataFrame operations don't allow to select columns of a particular DataFrame stored in FrameColumn. Only ColumnGroups can be traversed. For some operations (e.g. select or move) ability to address columns inside FrameColumn may cause runtime errors, for example, if selected columns have different size.
I see two possible solutions for that:
- Allow access inside
FrameColumns for all operations and leave possibility of runtime errors in some cases. - Use two different ColumnSelection DSLs for different operations: one that allows looking inside
FrameColumnand another that doesn't.
Since we're also considering renaming/reworking dfs, we can probably also find a new approach for recursively traversing dataframes inside frame columns :)