'''
OP has a csv file with currency in it. He wants the average rate using each currency
over the past 5 years, the average rate of each currency over each year, the
highest and lowest exchange rate of each currency over the past 5 years, and
the standard deviation of each currency over the past 5 years.
'''
import numpy as np
currencies = np.array([86.43, 87.45, 90.05, 90.20, 97.05, 20.95, 23.05, 29.76, 27.54, 25.55, 40.56, 47.69, 45.98, 45.89, 43.05]).reshape(3, 5)
mean_currency1 = np.mean(currencies[0,])
print('The mean exchange rate for currency 1 over the past 5 years is: {} '.format(mean_currency1))
mean_currency2 = np.mean(currencies[1,])
print('The mean exchange rate for currency 2 over the past 5 years is: {} '.format(mean_currency2))
mean_currency3 = np.mean(currencies[2,])
print('The mean exchange rate for currency 3 over the past 5 years is: {} '.format(mean_currency3))
year_1_currency1 = currencies[0, 0]
print('The average exhcnage rate value for currency 1 in year 1 was: {}'.format(year_1_currency1))
max_currency1 = np.max(currencies[0,])
print('The maximum exchange rate value for currency 1 over the past 5 years was: {}'.format(max_currency1))
min_currency1 = np.min(currencies[0,])
print('The minimum exchange rate value for currency 1 over the past 5 years was: {}'.format(min_currency1))
stdev_currency1 = np.std(currencies[0,])
print('The standard deviation for the exchange rate for currency 1 over the past 5 years was: {}'.format(stdev_currency1))
Instead of creating your own np.array, you'll simply use the data from the .csv file. I simply created my own array because I don't have your .csv of exchange rates. I also didn't find the stats for each currency, because I wanted to give you the broad idea of what you need to do. Once you import the .csv (if you don't know how to import the data I can help you with that as well), you simply need to make slices in order to get the statistics that you want. So for currency 1, we simply slice the data in row 0, and we can get the mean of that specific row. We can do that for each row of currency exchange rates that you need. For 1 year averages, we can take the mean of the data in each year (it's difficult to know exactly how your data is formatted without the .csv file format shown here). To find the minimum and max values, we can use the np.max function and the np.min function for each row of currency exchange rate data (slice the data). We can use the np.std function to find the standard deviation for a row of currency data (assuming your currency exchange rate data is formatted in rows). In the end, here is the output:
The mean exchange rate for currency 1 over the past 5 years is: 90.236
The mean exchange rate for currency 2 over the past 5 years is: 25.37
The mean exchange rate for currency 3 over the past 5 years is: 44.634
The average exhcnage rate value for currency 1 in year 1 was: 86.43
The maximum exchange rate value for currency 1 over the past 5 years was: 97.05
The minimum exchange rate value for currency 1 over the past 5 years was: 86.43
The standard deviation for the exchange rate for currency 1 over the past 5 years was: 3.7071261106145252
As you can see, I didn't perform the operations for each currency, but you will simply need to slice the row (or column depending on how the csv is formatted) that you want to work with. I did everything you asked for currency 1 as an example.