Grouping list

hi all i thought this would be easy but i cannot find way not to give index manually,
so im trying to group list of numbers ranging from 1-31 see example below, desired output is highlighted in red


What do you want / need to drive the indices of the items you want to chop? Is there a pattern like 3,2…2,3,2…2,3 etc? That may help us determine how to get you what you need.

hi sean sorry for incomplete info, basically i want to group them by month, current list is in proper order, so it’ll be like January 3,17,31, february 14, 28, and so on,…which means the indices are from days of the month
i started at 3 for particular reason and from there i have to count say 14 days all through a year and every 14 days i have to get first indices which in this case is 3,17,31,14,28,14,28,11,25 and so on…i hope it makes sense, not in front of pc right now i cant show the full graph. Thanks

list1(january)
3-31
list2(february)
1-28
and so on
full graph

Perhaps this thread could help get you started. I think perhaps you could go about it by “adding” the 14 days if that is what you need rather than trying to extract them all. You may also be able to create a list of all days in a month / year and then you can chop / split on that by your start and Delta.

@lucifer Assuming that the list comprises of consecutive sequences of ascending numbers that need to be split…
dateChop.dyn (24.7 KB) (ver 2.1)
dateChop

Think you’re looking at a imperative code block where if the number is less than the previous number, add one to the total. Otherwise return the previous value.

thank you vikram and Jacob,

@Vikram_Subbaiah sorry buddy not sure how to implement your solution in my current graph

@JacobSmall sounds good but my lack of knowledge in DS at the moment is not helping me :frowning:

image

Not sure why you couldn’t figure it out :expressionless:
Optimized a few initial steps in your graph and extended it with the suggestion I made earlier…

dateChop.dyn (37.3 KB) (ver 2.1)

dateChop

1 Like

awesome! Thank you

1 Like