Ir para conteúdo
Fórum Script Brasil

José Gomes Neto

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre José Gomes Neto

José Gomes Neto's Achievements

0

Reputação

  1. Qual o código para atualizar uma coluna do banco Oracle com uma variável Python? O código abaixo funcio0na no SQL server, mas no Oracle não ! ########### GRAVA O CONTEÚDO DA VARIÁVEL Y_predict0 NA COLUNA Desfecho_Algoritmo_RF na TABELA Tab_PythonTestes_Sem_desfecho ###################### # df0_GRAVA_DesfechoAlgoritmoRF = x_testRF # df0_GRAVA_DesfechoAlgoritmoRF['Desfecho_Algoritmo_RF_TabCom'] = y_predict0 sizes0_new = y_predict0 # for index, row in df0_GRAVA_DesfechoAlgoritmoRF.iterrows(): cursor.execute("UPDATE PythonTestes.dbo.Tab_PythonTestes_Com_desfecho SET Desfecho_Algoritmo_RF_TabCom = (?) WHERE CHAVE_PK is not null AND CHAVE_PK = (?);", row.Desfecho_Algoritmo_RF_TabCom,row.CHAVE_PK) conexao.commit() #cursor.close() # print(" ") print("Dados preditos referentes ao desfecho y, GRAVADOS na tabela Tab_PythonTestes_Com_desfecho") print(" ") sizes0_new = df0_GRAVA_DesfechoAlgoritmoRF['Desfecho_Algoritmo_RF_TabCom'].value_counts(sort=1) print (sizes0_new) # ################################################################################################################################### Obrigado !!
×
×
  • Criar Novo...