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.
|
|
|
import csv
|
|
|
|
|
|
|
|
def lecture(fichier):
|
|
|
|
"""renvoie tableau pour
|
|
|
|
traitement par d'autres programmes"""
|
|
|
|
|
|
|
|
tableau = []
|
|
|
|
with open(fichier, newline='') as csvfile:
|
|
|
|
lecteur = csv.reader(csvfile)
|
|
|
|
next(lecteur)
|
|
|
|
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
|
|
|
|
|