I\'m new in Python and I\'m trying to get the average of every (column or row) of a csv file for then select the values that are higher than the double of the average of its
This definitely worked for me!
import numpy as np
import csv
readdata = csv.reader(open('C:\\...\\your_file_name.csv', 'r'))
data = []
for row in readdata:
data.append(row)
#incase you have a header/title in the first row of your csv file, do the next line else skip it
data.pop(0)
q1 = []
for i in range(len(data)):
q1.append(int(data[i][your_column_number]))
print ('Mean of your_column_number : ', (np.mean(q1)))