dataframe icon indicating copy to clipboard operation
dataframe copied to clipboard

Ability to address Frame columns in DF via `colsAtAnyDepth` functionality

Open belovrv opened this issue 2 years ago • 2 comments

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

belovrv avatar Feb 15 '23 18:02 belovrv

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:

  1. Allow access inside FrameColumns for all operations and leave possibility of runtime errors in some cases.
  2. Use two different ColumnSelection DSLs for different operations: one that allows looking inside FrameColumn and another that doesn't.

nikitinas avatar Feb 21 '23 10:02 nikitinas

Since we're also considering renaming/reworking dfs, we can probably also find a new approach for recursively traversing dataframes inside frame columns :)

Jolanrensen avatar Apr 06 '23 19:04 Jolanrensen