31 lines
707 B
Python
31 lines
707 B
Python
"""
|
|
Copyright (c) 2020 Sdj Geek
|
|
Voir le fichier LICENSE
|
|
|
|
Classe d'accès aux données INSEE dans la base SQLite
|
|
|
|
"""
|
|
|
|
import pandas as pd
|
|
|
|
|
|
class ExcelOut:
|
|
|
|
def __init__(self, out_path):
|
|
self.out_path = out_path
|
|
self.data = list()
|
|
|
|
def add_member(self, member):
|
|
self.data.append({
|
|
'nom_registres': member.get_nom_registres(),
|
|
'nom_insee': member.get_nom_insee(),
|
|
'mrn': member.r_id,
|
|
'death_year': member.i_annee_deces,
|
|
'death_month': member.i_mois_deces,
|
|
'death_day': member.i_jour_deces
|
|
})
|
|
|
|
def generate_output(self):
|
|
df = pd.DataFrame(self.data)
|
|
df.to_excel(self.out_path)
|