inFile = open('memoryusage.csv', 'r')
outFile = open('filtered.csv', 'w')

outFile.write(inFile.readline()) # header

a = 0
while True:
    line = inFile.readline()
    if not line: break
    if a%6 == 0:
        outFile.write(line)
    a+=1

inFile.close()
outFile.close()
    
