Hi,
I have an application that will have a nested dictionary within another dictionary. Within the nested dictionary, I want to have a collection class that is evaluated and replaced if certain criteria are met.
What is the best way to define this?
Example:
DICT1 contains keys (Part 1 - Part 6) and item DICT2.
DICT2 contains keys (various quantity ranges) and item Coll.
Coll has three variables (Price, supplier, and date), which will be evaluated and altered under certain criteria
I don't know how to go about populating the collection or accessing that collection as it populates to potentially replace data in the collection that meets certain criteria. The syntax is eluding me.
An example of what I mean in a table with the various elements in [brackets]. This would potentially be the output format of the data.
Any help or insight on how to optimally write this code or how to approach this problem would be fantastic!
I have an application that will have a nested dictionary within another dictionary. Within the nested dictionary, I want to have a collection class that is evaluated and replaced if certain criteria are met.
What is the best way to define this?
Example:
DICT1 contains keys (Part 1 - Part 6) and item DICT2.
DICT2 contains keys (various quantity ranges) and item Coll.
Coll has three variables (Price, supplier, and date), which will be evaluated and altered under certain criteria
I don't know how to go about populating the collection or accessing that collection as it populates to potentially replace data in the collection that meets certain criteria. The syntax is eluding me.
An example of what I mean in a table with the various elements in [brackets]. This would potentially be the output format of the data.
Part number [DICT 1] | Qty range [DICT 2] | Price [coll.price] | Supplier [coll.supplier] | Quote Date [coll.date] |
Part 1 | 1 to 5 | $124.94 | Supplier 2 | 11/16/2018 |
6 to 10 | $71.46 | Supplier 2 | 11/16/2018 | |
11 to 25 | $52.08 | Supplier 2 | 11/16/2018 | |
51 to 100 | $10.49 | Supplier 1 | 9/12/2018 | |
101 to 250 | $8.85 | Supplier 1 | 9/12/2018 | |
Part 2 | 26 to 50 | $58.32 | Supplier 3 | 10/5/2018 |
51 to 100 | $52.74 | Supplier 3 | 10/5/2018 | |
101 to 250 | $49.41 | Supplier 3 | 10/5/2018 | |
Part 3 | 26 to 50 | $45.88 | Supplier 3 | 10/5/2018 |
51 to 100 | $37.23 | Supplier 3 | 10/5/2018 | |
101 to 250 | $32.02 | Supplier 3 | 10/5/2018 | |
Part 4 | 26 to 50 | $18.51 | Supplier 3 | 10/5/2018 |
51 to 100 | $14.28 | Supplier 3 | 10/5/2018 | |
101 to 250 | $11.76 | Supplier 3 | 10/5/2018 | |
Part 5 | 51 to 100 | $18.84 | Supplier 3 | 10/5/2018 |
101 to 250 | $15.60 | Supplier 3 | 10/5/2018 | |
250+ | $13.28 | Supplier 3 | 10/5/2018 | |
Part 6 | 26 to 50 | $80.53 | Supplier 3 | 11/7/2018 |
51 to 100 | $60.23 | Supplier 3 | 11/7/2018 | |
101 to 250 | $52.83 | Supplier 3 | 11/7/2018 |
Any help or insight on how to optimally write this code or how to approach this problem would be fantastic!