I'm currently working with a .csv
file in ruby and I'm trying to figure out how to count the number of items that are over 60 in the file.
I've imported the csv file into a hash and counted the total number of items, but I want to know how to count the number of items over 60 now.
This is an example of what I'm looking for
csv.csv
:
55, 56
60, 61
63, 9
3, 62
My code so far:
myhash=[]
myhash1=[]
total=0
count=0
file=File.open('csv.csv',"r")
???
puts count
Expected output: 4