Skip to content
Snippets Groups Projects
Commit 2786687b authored by rubegar's avatar rubegar
Browse files

Delete restar.py

parent de459e13
No related branches found
No related tags found
No related merge requests found
import csv
def restar_tiempo_pequeno(file_path):
with open(file_path, 'r') as file:
reader = csv.DictReader(file)
fieldnames = reader.fieldnames + ['tiempo_resultado']
rows = list(reader)
with open('diferencias.csv', 'w', newline='') as result_file:
writer = csv.DictWriter(result_file, fieldnames=fieldnames)
writer.writeheader()
for row in rows:
tiempo_grande = float(row['tiempoGrande'])
tiempo_pequeno = float(row['tiempoPequeño'])
tiempo_resultado = tiempo_grande - tiempo_pequeno
row['tiempo_resultado'] = tiempo_resultado
writer.writerow(row)
restar_tiempo_pequeno('medidas_juntos.csv')
\ 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