-1
I made a script in python and need help.
As you can see, a spreadsheet in excel is opened, treats the data and returns to another spreadsheet.
When opening the new spreadsheet, the numbers get huge and the date also, for example, 1.333333 and I would like it to stay 1.33.
put = pd.read_excel('Operacao_inicial.xlsm', sheet_name='Rastreador_PUT', decimal=",", thousands='.', inex_col=(), false_values='NaN', keep_default_na=False, header=8)
put =pd.DataFrame(put, columns=['STRIKE','ATIVO','VENC.','Robo PUT','Real Time','TIR (%)','Strike VS Cot. (%)','Money','Negocios'])
put['STRIKE'] = pd.to_numeric(put['STRIKE'], errors='coerce')
put['VENC.'] = pd.to_datetime(put['VENC.'], errors='coerce')
put['Real Time'] = pd.to_numeric(put['Real Time'], errors='coerce')
put['TIR (%)'] = pd.to_numeric(put['TIR (%)']*100, errors='coerce')
put['Strike VS Cot. (%)'] = pd.to_numeric(put['Strike VS Cot. (%)']*100, errors='coerce')
put['Money'] = pd.to_numeric(put['Money'], errors='coerce')
put['Negocios'] = pd.to_numeric(put['Negocios'], errors='coerce')
put.to_excel('Robo_operacional.xlsx', index=0)
schedule.every(5).minutes.do(coletar_dados)
while True:
schedule.run_pending()
time.sleep(5)