OumaimaBoudchich / machineLearningProject

0 stars 1 forks source link

Database connection to Power Bi #5

Open OumaimaBoudchich opened 2 years ago

OumaimaBoudchich commented 2 years ago

import pandas as pd
connection = cx_Oracle.connect(user="**", password="****", dsn="ProjetDB_low")
cursor = connection.cursor()
cursor.execute("select * from BUREAU")
cursor.fetchone()

query = """select  * from APPLICATION_TRAIN"""
dftrain = pd.read_sql(query, con=connection)```