cut description
This commit is contained in:
17
main.py
17
main.py
@ -73,12 +73,21 @@ for index, row in df.iterrows():
|
||||
|
||||
|
||||
if math.isnan(row['GRUPPO STATISTICO']):
|
||||
tsa_codice = row['TSA_CODICE']
|
||||
tsa_codice = row['GRUPPO STATISTICO']
|
||||
else:
|
||||
tsa_codice = int(row['TSA_CODICE'])
|
||||
tsa_codice = int(row['GRUPPO STATISTICO'])
|
||||
|
||||
frn = row['FORNITORE']
|
||||
frn = str(row['FORNITORE'])
|
||||
|
||||
descrizione2 = ' '
|
||||
## se decrizione supera 40
|
||||
len_descrizione = len(descrizione)
|
||||
if len_descrizione > 40 :
|
||||
descrizione1 = descrizione [: 40]
|
||||
print(descrizione1)
|
||||
descrizione2 = descrizione [40 :]
|
||||
print(descrizione2)
|
||||
descrizione = descrizione1
|
||||
|
||||
if conn :
|
||||
if ricarica1 is not None and not math.isnan(ricarica1):
|
||||
@ -122,7 +131,7 @@ for index, row in df.iterrows():
|
||||
if not pd.isna(frn):
|
||||
frn = ' '
|
||||
|
||||
value_insert = insert_records(conn,codice,descrizione,um,prezzo,sc1,sc2,ricarica,listino,codice_alternativo,codice_barre,art,tsa_codice,frn)
|
||||
value_insert = insert_records(conn,codice,descrizione,descrizione2,um,prezzo,sc1,sc2,ricarica,listino,codice_alternativo,codice_barre,art,tsa_codice,frn)
|
||||
write_excel_insert(value_insert)
|
||||
|
||||
if conn :
|
||||
|
||||
Reference in New Issue
Block a user