<commit_before>
import csv
with open('../Data/Test_Data//RECS2009/recs2009_public.csv') as csvfile:
    readCSV = csv.reader(csvfile, delimiter=',')

    totrooms = []
    playsta1 = []

    for row in readCSV:
        room_total = row[34]
        playstation = row[246]

        totrooms.append(room_total)
        playsta1.append(playstation)

    print(totrooms)
    print(playsta1)<commit_msg>Converted the lists to np.array and found averages<commit_after>
import csv
import numpy as np


with open("/home/adam/GitHub/RedRocksCommunityCollege/Clair-Global-Collab/Data/Test_Data/RECS2009/recs2009_public.csv") as csvfile:
    readCSV = csv.reader(csvfile, delimiter=',')

    totrooms = []
    playsta1 = []

    for row in readCSV:
        room_total = row[34]
        playstation = row[246]

        totrooms.append(room_total)
        playsta1.append(playstation)

    print(totrooms)
    print(playsta1)

#Check the types
type(totrooms)
type(playsta1)

#Convert to a numpy array
roomarray = np.delete(np.asarray(totrooms),0,0) #np.delete will remove the name since it is the first entry.
plarray = np.delete(np.asarray(playsta1),0,0)

print(roomarray)
roomarray[0] #Pull the first element of the arr
np.shape(roomarray)

print(plarray)
playsta1[0]
np.shape(plarray)


room = np.array([])

for i in range(0,np.shape(roomarray)[0]):
    d = int(roomarray[i])
    room = np.append(room,d)

np.sum(room)
np.sum(room)/np.shape(roomarray)[0]

games = np.array([])
for i in range(0,np.shape(plarray)[0]):
    d = int(plarray[i])
    games = np.append(games,d)

np.sum(games)
np.sum(games)/np.shape(plarray)[0]
{'fraction_non_alphanumeric': 0.13478260869565217, 'fraction_numerical': 0.029192546583850933, 'mean_word_length': 3.752212389380531, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '78080', 'n_tokens_mistral': 632, 'n_tokens_neox': 584, 'n_words': 120}