Ask Question
24 March, 06:31

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. 24 March, 06: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
  2. 24 March, 06:56
    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)
Know the Answer?
Not Sure About the Answer?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers