tools update drop fonction

This commit is contained in:
Colas Geier 2021-10-11 16:15:24 +02:00
parent 1be1b4ce88
commit 97a61b34e4

View File

@ -191,7 +191,7 @@ def _get_relation_tab(schema, tab, id_site=None, nom_site=None, last_update=Fals
last_update=last_update,params_col=params_col,milieu=milieu,statut=statut)
if not geom and not dfSG.empty:
dfSG.drop('geom',1,inplace=True)
dfSG.drop(columns=['geom'],inplace=True)
ids = dfSG.id.tolist()
table = tab
@ -215,7 +215,7 @@ def _get_relation_tab(schema, tab, id_site=None, nom_site=None, last_update=Fals
if not df.empty:
df = merge(dfSG,df, how='left', left_on='id', right_on='id_geom_site', suffixes=('_x', None)) \
.drop(['id_x','id_geom_site'],1) \
.drop(columns=['id_x','id_geom_site']) \
.set_index('id').reset_index()
return df