I'm trying to create 8 or 16 buckets in my dataset.
Looking at my sequence number, i should create buckets grouped by pair.
I can only be either 8 or 16 orders. If i cannot make up to 16 orders, i try to make 8 orders. Remaining go into bucket '99999'. If no 8 buckets can be made, all in that pair goes to '99999' Here is my sample data.