Page 1 of 1

This data has the information for each purchased item with its “Date, Transaction Number, UPC Number, Product Name, Cust

Posted: Sat May 14, 2022 7:03 pm
by answerhappygod
This data has the information for each purchased item with its
“Date, Transaction Number, UPC Number, Product Name, Customer
Account, Qty, Regular Price, Sale Price, and Discount”. Please
write the python code to (This is intended to train your logic
thinking of how to use if statement and for statement.) Show the
product name of all the items purchased in the transaction number
T00500000823. (Hint: you should have the following 9 items: “SANTA
SWEETS GRAPE TOMATO, AVOCADO HASS, CILANTRO, SCALLIONS, YELLOW
SQUASH, FRESH ATTITUDE SPRING MIX, BROCCOLI, CAULIFLOWER, and
SUNDANCE ORG LEMONS”).
This Data Has The Information For Each Purchased Item With Its Date Transaction Number Upc Number Product Name Cust 1
This Data Has The Information For Each Purchased Item With Its Date Transaction Number Upc Number Product Name Cust 1 (146.47 KiB) Viewed 45 times
This is what I am getting jammed up on currently:
This Data Has The Information For Each Purchased Item With Its Date Transaction Number Upc Number Product Name Cust 2
This Data Has The Information For Each Purchased Item With Its Date Transaction Number Upc Number Product Name Cust 2 (50.17 KiB) Viewed 45 times
OOOOOOOOOO Date Transaction Number 34:35.3 T00100000161 34:35.3 T00100000161 34:35.3 T00100000161 34:35.3 T00100000161 52:01.5 T00800000279 52:01.5 TO0800000279 52:01.5 TO0800000279 52:01.5 TO0800000279 52:01.5 TO0800000279 52:01.5 TO0800000279 53:05.0 TO0800000280 53:05.0 TO0800000280 53:05.0 TO0800000280 53:05.0 TO0800000280 53:05.0 TO0800000280 56:38.7 TO0800000281 58:20.8 T00800000282 58:20.9 TO0800000282 58:20.9 TO0800000282 58:20.9 TO0800000282 58:20.9 TO0800000282 58:20.9 TO0800000282 58:20.9 TO0800000282 58:20.9 T00800000282 59:31.9 T00800000283 59:31.9 TO0800000283 59:31.9 TO0800000283 00:10.7 TO0800000284 00:10.7 TO0800000284 01:44.3 TO0800000285 01:44.3 TOO800000285 01:44.3 TO0800000285 01:44.4 TO0800000285 01:44.4 TO0800000285 02:02.0 TO0800000286 02:02.0 TO0800000286 02:02.1 TO0800000286 06:28.8 TO0800000287 06:28.8 TO0800000287 08:56.2 TO0100000197 08:56.3 TO0100000197 08:56.3 TO0100000197 08:56.3 T00100000197 UPC Number POOO0000004601 POOO0000004601 POOO0000004402 POOO0000004601 PO007341016305 PO007341000304 PO005100002550 PO005480002001 POO20100000000 POO08000000672 POO07800002121 PO007127927118 PO007127923100 PO000000004060 POO20508300000 P0004900005545 PO005360000058 PO005360000066 PO000000004011 PO000000004011 P0001300000814 PO005363700001 PO021014700000 PO007513085847 PO000000004896 PO000000004062 POO00000004062 POO73291322769 P0007513067910 PO063256500003 POO06731200525 P0004133104955 POOO7513068894 POOO2529300149 P0007513054723 POOO4900002468 POOO7447101108 POOO0000004011 PO000000004844 PO074917409484 PO009020820103 P0003338369999 P0000000004060 Product Name EGGPLANT LARGE EGGPLANT LARGE PEACHES SMALL EGGPLANT LARGE ARN SANDWICH BUNS ARNOLD BIG SLICE CAMPBELL'S BEEF GRAVY UNCLE BEN'S ORIGINAL RECIPE RI BEEF CHUCK CHOPPED STARKIST TUNA SOLID WHITE CANADA DRY SPARKLING SELTZER BERRY 2 LTR FRESH EXPRESS SWEET & CRUNCHY FRESH EX SPRING MIX BROCCOLI CHERRY TOMATOES SPRITE 1.5 LITER LA YOGURT BLUEBERRY PROBI LA YOGURT LT PEACH PROBIO YELLOW BANANAS YELLOW BANANAS HEINZ CIDER VINEGAR ROMA ITALIAN BREAD DELI TURKEY KRASDALE SHARP CHEDAR CHEESE MINT CUCUMBERS CUCUMBERS SEVENTH GEN DETERGENT KRASDALE TT WHITE SINGLE ROLL 79 FIJI ARTESIAN WATER VOORTMAN SF VANILLA WAFER GOYA SNACK CRACKERS KRASDALE MEDIUM GARBAGE BAGS 2.39 SILK UNSWEETENED ALMOND MILK KRASDALE NON-DAIRY CREAMER COCA COLA CAFE BUSTELO INSTANT YELLOW BANANAS YELLOW PLANTAINS EARTH FRIENDLY HAND SOAP ORANGE BLOSSOM GRADE A LARGE EGGS 1/2 DOZ CAULIFLOWER BROCCOLI Customer Account Qty CSYSTEMID 1.25 CSYSTEMID 1.26 CSYSTEMID 1.25 CSYSTEMID 1.25 C0044101043442 1 C0044101043442 1 C0044101043442 1 C0044101043442 1 C0044101043442 1 C0044101043442 1 CSYSTEMID 2 CSYSTEMID 1 CSYSTEMID 1 CSYSTEMID 1 CSYSTEMID 1 CSYSTEMID 1 C0044101011944 1 C0044101011944 1 C0044101011944 1.8 C0044101011944 2.64 C0044101011944 1 C0044101011944 1 00044101011944 1 C0044101011944 1 CSYSTEMID 1 CSYSTEMID 3 CSYSTEMID 3 CSYSTEMID 1 CSYSTEMID 2 C0044101046706 1 C0044101046706 1 C0044101046706 1 C0044101046706 1 C0044101046706 1 CSYSTEMID 1 CSYSTEMID 1 CSYSTEMID 1 CSYSTEMID 1.48 CSYSTEMID 3 CSYSTEMID 1 CSYSTEMID 2 CSYSTEMID 1 CSYSTEMID 1 Regular Price Sale Price Discount 1.99 1.99 1.99 1.99 2.99 2.99 1.99 1.99 0 3.69 3.69 0 4.19 2.5 1.69 1.49 1.49 0 2.39 2.39 0 3.38 3.38 0 2.29 2.29 0 1.99 1.25 0.74 3.99 2.5 1.49 3.49 2.5 0.99 1.99 1.99 0 4.24 4.24 0 1.29 1.29 0 0.79 0.79 0 0.79 0.79 0 0.89 0.89 0 0.89 0.89 0 2.39 2.39 0 1.99 1.99 0 2.22 2.22 0 3.99 2.5 1.49 2.99 2.99 0.666666667 0.67 0.666666667 0.67 9.99 6.49 3.5 0.79 0.5 0.29 2.49 2.49 2.99 2.99 3.09 3.09 2.39 2.39 4.79 4.79 2.99 2.99 0.87 0.87 5.99 4.99 0.89 0.89 0.666666667 0.67 3.49 3.49 1.69 1.69 3.99 3.99 1.99 1.99 oooooooooo 25 in OOO OOOOOOOOOOOOO

import pandas as pd -import datetime as dt 2 3 4 df = pd. read_csv('/Users/NOJ/Downloads/supermarket_data.csv") 5 N N 000 6 7 for i in df.index: if df['Transaction Number'] == T00500000823: A print (df['Product Name']) 8 9 Run: HW8 x 8 个 → If Traceback (most recent call last): File "/Users/kevinreichardt/PycharmProjects/Homework8.2/venv/HW8/HW8.py", line 7, in <module> if df['Transaction Number'] == T00500000823: NameError: name 'T00500000823' is not defined Process finished with exit code 1