Use the ledger selection pattern on a delivery list. The same row can be selected by its label, such as noon, or its current position, such as 1. Changing the row labels should not change how a positional slice works.
label_window receives existing start and stop labels and must choose the named columns item and count. position_window receives integer positions and must choose the first two columns, whatever their names are. Neither function should reset row labels or edit the input.
The print calls are supplied. After task 1, Run should show Apples and Beans in the first table. After task 2, the second table should show Beans and Bread.
.loc to return rows from start through stop, inclusive, with item and count in label_window(frame, start, stop)..iloc to return rows from position start up to but not including stop, and the first two columns, in position_window(frame, start, stop).Edit main.py, press Run to inspect the table, then Submit to check your work.
Use loc with labels for the first function and iloc with integer slices for the second.