Is there a function in the standard library simila...
# announcements
l
Is there a function in the standard library similar to
groupBy
but returns a
List<List<T>>
instead of a map? I don’t need the keys.
n
i guess you can just get the values from the map
1
f
l
Yes well… That’s what I am doing right now, but that’s an extra step. I don’t need an extra map creation
f
Directly collect into a set then.
It's hard to give a proper answer because it's not exactly clear what data you have and what data you want. 😉
l
I have a list of models with a timestamp that I am grouping per day, but the day is irrelevant.
f
So you want a list with lists containing the models per day. I fail to see how this is possible without keeping track of something… I guess some math magic is possible if the amount of days we go back is limited and we use an outter array with a fixed length… this is getting out of hand already. I think the intermediate map is a good middle ground. How would you solve it without keeping track of anything?
l
Smart observation. All right I’ll keep it the way it is. Thanks for your hindsight
a
~h~in~d~sight FTFY
😄 1
f
🙂
j
@Luke what is the overall usecase? i've been refining a dataframe focussed on timeseries resample+pivot+groupby workloads and came upon groupby using indexes mapped into [the same as] List<List<*>> as an transform of an immutable source