I have a column with a list of values like so:
100
200
300
500
600
650
1000
I want to do a Groupby
(or a similar efficient construct) to get batches of rows where the value of each row is within 100
of the last row.
In that case the batches produced from the example above would be
100, 200, 300
,
500, 600, 650
1000
Is this possible to do in Pandas? Since Pandas attempts to allow for SQL-like queries, I am guessing that it should be.