Question

Consider the CSV file HW3CustomerOrders.csv posted on Canvas. The file contains information of customer orders received by a warehouse during one month (June/2017). The following is the description of the columns in the file: Customer ID: A unique identification number assigned to each customer Date: The date when the customer order was placed SKU: The product identification number Units :Number of units requested Value: Dollar value of the units requested

Python Coding Problem! Please show exact code

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

1 f-open( HW3CustomerOrders.csv,r) 2 f.readline() 3 no_lines 4 customers [] 5 sku=[] 6 for line in f.readlines (): fields line.strip().split(,) if fields[0] not in customers 8 customers[fields[ ]] 10 if fields[2] not in sku: skul fields[211 12 print(No of lines in the file:, no lines) 13 print(No. of differenct customers:, len(customers)) 14 print(No. of different SKUS:, len(sku))

Add a comment
Know the answer?
Add Answer to:
Python Coding Problem! Please show exact code Consider the CSV file "HW3CustomerOrders.csv" posted on Canvas. The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use the csv file on spotify from any date Code from lab2 import java.io.File; import java.io.FileNotFoundException;...

    Use the csv file on spotify from any date Code from lab2 import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class SongsReport {    public static void main(String[] args) {               //loading name of file        File file = new File("songs.csv"); //reading data from this file        //scanner to read java file        Scanner reader;        //line to get current line from the file        String line="";       ...

  • Python Help Please! This is a problem that I have been stuck on.I am only suppose...

    Python Help Please! This is a problem that I have been stuck on.I am only suppose to use the basic python coding principles, including for loops, if statements, elif statements, lists, counters, functions, nested statements, .read, .write, while, local variables or global variables, etc. Thank you! I am using python 3.4.1. ***( The bottom photo is a continuation of the first one)**** Problem statement For this program, you are to design and implement text search engine, similar to the one...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT