You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
625 B

5 months ago
import csv
def lecture(fichier):
"""renvoie tableau pour
traitement par d'autres programmes"""
5 months ago
tableau = []
with open(fichier, newline='') as csvfile:
lecteur = csv.reader(csvfile)
next(lecteur)
5 months ago
for ligne in lecteur:
date = ligne[0]
pic_journalier_consommation = float(ligne[1])
temperature_moyenne = float(ligne[2])
temperature_reference = float(ligne[3])
tableau.append([(date, temperature_moyenne, temperature_reference), \
pic_journalier_consommation])
return tableau