I have a database with more than a thousand reviews (text) in a csv file, however I need only texts that contain more than 5 words to be in my file. The problem is to make a code that scrolls the entire document line by line and leave only opinions that have more than 5 words, I have already researched some libraries and I have not had success in this implementation.
I'm using this code to read the file:
import csv
lines = []
finalLines = []
with open('aborto.csv') as csvfile:
readerCSV = csv.reader(csvfile, delimiter=',')
print(readerCSV)
for row in readerCSV:
print(row)