import csv


def get_one_stock_price(ticker, date, data_dir):
    """Gets the price of a stock at a certain date"""
    with open(data_dir + ticker + '.csv', 'r') as f:
        reader = csv.reader(f)
        price = 0  # ($)
        for row in reader:
            if row[0] == date:
                price = float(row[1][2:])  # ($)
    return price