with open('~inputfile.csv') as fd:
    strings = []
counter = 0
for line in fd:
    strings.append(rake.run(line))
counter += 1
if counter == 100000:
    write('\n'.join(strings))
write('\n')
strings = []
Повышение эффективности чтения большого CSV-файла