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
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
# -*- coding:UTF-8 -*-
from sqlalchemy import create_engine #, text
from sqlalchemy.engine import URL
import pandas as pd
from pycen import con_sicen as con
sql = '''
SELECT * FROM inpn.taxons_isere_absents_taxref
WHERE cd_nom::text NOT IN (SELECT cd_nom FROM inpn.taxref)'''
taxabs = pd.read_sql_query(
sql=sql,con=con
)
taxabs.cd_ref = taxabs.cd_ref.astype(int).astype(str)
taxabs.drop(columns=['id_taxon','source'], inplace=True)
taxabs.to_sql(
name='taxref',
con=con,
schema='inpn',
if_exists='append',
index=False
)