init depot renew

This commit is contained in:
2026-09-22 11:58:57 +02:00
commit e9fa6a7309
205 changed files with 39721 additions and 0 deletions
@@ -0,0 +1,22 @@
import pandas as pd
from os import path
from pycen import con_gn
# PARAMS
PATH = '/home/cgeier/Téléchargements'
file = 'donnees_ebms_platiere2025.csv'
# READ DATA
tax = pd.read_sql('SELECT * FROM taxonomie.taxref where cd_nom=cd_ref',con_gn)
df = pd.read_csv(path.join(PATH,file),index_col=0)
# MAKE DICTIONARY
dic_tax_lbno = dict(zip(tax.lb_nom,tax.cd_ref.astype(str)))
# MANIP DATA
df['cd_ref'] = df['Preferred Species Name'].copy()
df.replace({'cd_ref':dic_tax_lbno},inplace=True)
df['cd_ref'] = df['cd_ref'].astype(int)
df.to_csv(path.join(PATH,file))