Code: Select all
Unl-Self 669.878 1419.48
Ul-Plus-Self 42.943 97.43
Supreme-Self 128.648 349.79
Diesel-Self 19.100 44.30
Automotive 0 0.00
Beverage 0 0.00
Candy 5 5.21
Coffee 0 0.00
Coke Product 1 0.99
Cigarettes 0 0.00
Energy Drink 4 9.18
Fountain 2 2.18
Grocery 2 1.58
Cash Back Fe 0 0.00
Gatorade 0 0.00
Arizona 0 0.00
General Merc 0 0.00
Newspapers 3 2.50
Pepsi Produc 1 0.79
Beer 0 0.00
Tobacco 0 0.00
HBA 5 3.25
Novelty 0 0.00
Ice Bags 0 0.00
Electric Cig 0 0.00
Peanuts 0 0.00
Phone Charge 0 0.00
HOT DOG ETC. 0 0.00
Fuel Correct 0 0.00
Phone card 0 0.00
Rip It Energ 3 2.97
Unknown 0 0.00
Gift Card 0 0.00
Each one of the items in column 1 correspond to another moniker. For example, 'Ice Bags' is 'Non-Fuel:Ice'.
Lines that have a 0.00 amount in both the second and third columns can be deleted from the final file.
What I want is this entire file changed to this format (essentially transposed) with the monikers for each item. Example:
Code: Select all
Fuel:87
669.878
1419.48
Fuel:89
42.943
97.43
Fuel:93
128.648
349.79
Fuel:Diesel
19.100
44.30
Non-Fuel:Candy
5
5.21
Non-Fuel:Coke
1
0.99
Non-Fuel:Energy Drink
4
9.18
Non-Fuel:Fountain
2
2.18
Non-Fuel:Grocery
2
1.58
Non-Fuel:Newspapers
3
2.50
Non-Fuel:Pepsi
1
0.79
Non-Fuel:HBA
5
3.25
Non-Fuel:Rip It
3
2.97
A couple of other helpful facts. The numbers of lines to process does not change, nor does the position or name of each moniker. It could change, but a bunch of other things would break too, so it's not a real problem to use hardcoding if it makes the code easier to follow.
Can you help me make this lean and mean? Thank you in advance!