I have a list of dates as follows
[['2018-05-24', 6000], ['2018-05-25', 43300], ['2018-06-27', 0], ['2018-06-28', 20400], ['2018-06-03', 600], ['2018-07-03', 1100]]
I want the above array to be split as follows
[['2018-05-24', 6000], ['2018-05-25', 43300]]
['2018-06-27', 0], ['2018-06-28', 20400], ['2018-06-03', 600]]
[['2018-07-03', 1100]]
Is there any way to do this in Python?
Use
groupby
fromitertools
Ex:
Output: