Ask Question
9 February, 10:15

Write a program that asks the user for a CSV of the NYC Open Data Film Permits: There is a sample file for June 2019 film permits on github. Your program should then print out: the total number of permits in the file, the count of permits for each borough, and the five most popular locations (stored in the column: "Parking Held").

+2
Answers (2)
  1. 9 February, 11:44
    0
    Before running this program, make sure you have installed pandas module for python.

    pip install pandas

    import pandas as pd

    import numpy as np

    csv_file = input ("Enter CSV File Name : ")

    df = pd. read_csv (csv_file)

    count_row = df. shape[0]

    print ("There were %d Film Permits in Total." % (count_row))

    borough_count = df['Borough']. value_counts ()

    print (borough_count)

    location_count = df['ParkingHeld']. value_counts (). head (5)

    print (location_count)
  2. 9 February, 12:50
    0
    pip install pandas

    import pandas as pd

    import numpy as np

    csv_file = input ("Enter CSV File Name : ")

    df = pd. read_csv (csv_file)

    count_row = df. shape[0]

    print ("There were %d Film Permits in Total." % (count_row))

    borough_count = df['Borough']. value_counts ()

    print (borough_count)

    location_count = df['ParkingHeld']. value_counts (). head (5)

    print (location_count)

    Explanation:

    Before running this program, make sure you already previously installed pandas module for python.

    Import panda and numpy

    Put csv file

    count row

    then tell to print
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a program that asks the user for a CSV of the NYC Open Data Film Permits: There is a sample file for June 2019 film permits on ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers