Closed Jolanrensen closed 8 months ago
I'll mention some of our helpful contributors below. Feel free to ignore this mention if you are not interested (anymore), but we value your opinion :).
Check out the Discussion if you want :)
@nikitinas @Kopilov @pacher @holgerbrandl @vhuc @Jimexist @Kantis @cmelchior @Adriankhl @alllex @matthewwiese @njacobs5074 @PoslavskySV
My answers on the questions (from my feeling of user)
Split plain DSL calls from SingleColumn functions? Yes, please
KProperty<DataRow<>>.function() or KProperty<>.function()
I prefer KProperty<>.function() for every day routine
I'm a big fun of this approach
df.select { SomeType::created.function3() // :) SomeType::filtering.function3() // :) SomeType::name.function3() // :( }
Question: All, Cols, Children overlap and differences
I don't use this API
// all same df.select { all() } df.select { cols() } df.select { children() } // same but debatable name? df.select { filter { true } }
but love this
// all same
df.select { created.all() }
df.select { created.cols() }
df.select { created.children() }
df.select { created.filter { true } }
But it's ok to keep, the behaviour should be the same
Question: String/ColumnPath, allow group calls directly on it or only on SingleColumn?
yes, more useful functions everywhere
From the other hand, I really don't understand the concept where we call columns via String names.
If this works, what's the problem to be more Pytonic everywhere:)
Question: cols {} vs filter {}
For filtering columns, I suggest use only one operator like cols{}, filter confused me here, I'm starting to think about data filtering
Question: What to do with Except?
Probably minus
or overloading of -
is better here. Thinking about columns like about List in Kotlin
Question: If SingleColum.except would keep structures intact, should select {} as well?
I'd like this // then what should this do? Select items and link with JUST target inside? // We could even make a take {} function for this for example
Question: What to do about Select/Cols overlap?
Only this looks not pretty for me, no big deal hierarchy of selects, but sometimes for reading, I want to see something like "innerSelect" or "nestedSelect"
section.select { "link"[{ it.name.startsWith("target") }] }
()-option and []-overloads
As I said, the [] overloading is not the best hier, from my point of view. Especially mixed with the Strings
Please leave your thoughts in the Discussion
Discussed in https://github.com/Kotlin/dataframe/discussions/396