I'll create a CSC of 1,341 lines (with header). In Python 3 I used the csv commands, but the created file has 1,282 lines
Line data is extracted from 1,340 PDFs, metadata. I created a list and a print to check, it's extracting everything right.
The CSV code:
import csv
conjunto = open('emendas_autores.csv', mode='w', encoding='latin_1')
resultado = csv.DictWriter(conjunto, fieldnames=["Arquivo", "Autor", "Assunto", "Data_Criacao", "Data_Moficacao"])
resultado.writeheader()
def salva_csv():
print("+")
print (arquivo)
print (author)
print (subject)
print (creation_date)
print(mod_date)
print("+")
resultado.writerow({'Arquivo': arquivo,
'Autor': author,
'Assunto': subject,
'Data_Criacao': creation_date,
'Data_Moficacao': mod_date})
return
Then the iteration that extracts the data from the PDFs and calls the function salva_csv()
and each file
Please, would anyone know what could be wrong to stop at 1,282 lines? Is there a size limit in csv writerow?