Skip to content
Snippets Groups Projects
Commit 03b6d69a authored by rubegar's avatar rubegar
Browse files

Upload New File

parent b2d8a7c9
No related branches found
No related tags found
No related merge requests found
import csv
def count_lines(file_path):
with open(file_path, 'r') as file:
reader = csv.reader(file)
next(reader)
return sum(1 for _ in reader)
peticionesGrande = count_lines("medidasGrande.csv")
peticionesPequeña = count_lines("medidasPeque.csv")
prodGrande = peticionesGrande / 251
prodPequeña = peticionesPequeña / 251
with open('peticiones_juntos.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerow(['numeroPeticionesGrande', 'numeroPeticionesPeque'])
writer.writerow([peticionesGrande, peticionesPequeña,])
writer.writerow(['productividadGrande', 'productividadPeque'])
writer.writerow([prodGrande, prodPequeña])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment