Not being able to read the csv file .
Getting error in this part of the program:
def get_data(aapl):
with open('aapl.csv','r') as csvfile:
csvFileReader = csv.reader(csvfile)
next(csvFileReader)
for row in csvFileReader:
dates.append(int(row[0].split('-')[0]))
prices.append(float(row[1]))
return
And the error is:
get_data('aapl.csv')
FileNotFoundError Traceback (most recent call last)
in
----> 1 get_data('aapl.csv')
in get_data(aapl)
1 def get_data(aapl):
----> 2 with open('aapl.csv','r') as csvfile:
3 csvFileReader = csv.reader(csvfile)
4 next(csvFileReader)
5 for row in csvFileReader:
FileNotFoundError: [Errno 2] No such file or directory: 'aapl.csv'