Screen Link:
https://app.dataquest.io/m/314/dictionaries-and-frequency-tables/13/filtering-for-the-intervals
My Code:
opened_file = open('AppleStore.csv')
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
■■■■=[]
for i in apps_data[1:]:
■■■■.append(int(i[5]))
print(min(■■■■))
print(max(■■■■))
frequency={'0-1000':0,'1000-10000':0,'10000-100000':0,'100000-1000000':0,'1000000-10000000':0}
for i in apps_data[1:0]:
size=int(i[5])
if (size >0) and (size<=1000):
frequency['0-1000']+=1
elif (size>1000) and (size<=10000):
frequency['1000-10000']+=1
elif (size>10000) and (size<=100000):
frequency['10000-100000']+=1
elif (size>100000) and (size<=1000000):
frequency['100000-1000000']+=1
elif size>1000000:
frequency['1000000-10000000']+=1
print(frequency)
What I expected to happen:
Well, I expected the keys of the dictionary to have some values
What actually happened:
{'10000-100000': 0, '1000-10000': 0, '0-1000': 0, '100000-1000000': 0, '1000000-10000000': 0}
What is the problem here?