import csv 

def readCSVFile(path):
    f = open(path, "r")
    reader = csv.reader(f)
    data = []
    for row in reader:
        data.append(row)
    return data

"""
Write a function to create a dictionary from the input 2D list, 
where the department_name for each inner list is the key and the value 
is a 2 element list of the corresponding location_id and department_expenses
for that inner list.
Note that department_name is at index 1 of each row of data, 
location_id is at index 2, and department expenses is at index 3
"""

def departmentNameDict(data):
    pass

"""
Write a function that given a dictionary like the one created above and a list
of departments, finds the mean expenses across the given departments and the 
most common location among the departments (hint: you can use mode on 
non-numerical data) and prints them to the user.
You may want to import a package to help you with this function!
"""

def departmentInfo(d, departments):
    pass

"""
Write a function that displays two graphs:
The first graph should display the expenses of departments within each
location in a scatterplot.
The second graph should only display the expenses of departments that
spent over $100,000 in a bar graph.
Hint: You should use the matplotlib module to make your bar graphs!
"""

def expenseGraphs(d):
    pass

# Write a line of code below to call readCSVFile and store the result in 
# a variable called data!
# What are we using as data for this problem?


departmentDictionary = departmentNameDict(data[1:])
expenseGraphs(departmentDictionary)