Created
May 10, 2019 18:51
-
-
Save Elaine-AL/7c95721074ca8c44db5165ab98b5e4d9 to your computer and use it in GitHub Desktop.
My first python program!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open_file = open("AppleStore.csv") | |
from csv import reader | |
read_file = reader(open_file) | |
apps_dataset = list(read_file) | |
rating_sum = 0 | |
for each_row in apps_dataset[1: ]: | |
rating = float(each_row[7]) | |
rating_sum += rating | |
print(rating_sum) | |
avg_rating = rating_sum/7159 | |
print(avg_rating) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is my first python program that loops through a list of lists from the csv file using for loop to find the average of the app ratings which was 3.52.