# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## Importando pacotes

# %matplotlib inline
import pandas as pd
import numpy as np
from sqlalchemy import create_engine

# ## Criando conexão com o banco de dados

# _Caso tenha problemas com `encoding`, você pode passar o charset como parâmetro na conexão._
# ```
# "firebird+fdb://sysdba:masterkey@firebird:3050//firebird/data/database.fdb?charset=ISO8859_1")
# ```

engine = create_engine("firebird+fdb://sysdba:masterkey@firebird:3050//firebird/data/examples.fdb")
def run_query(query):
    return pd.read_sql_query(query,con=engine)


# ## Executando query

query = """
select * from CUSTOMER;
"""
df = run_query(query)

df.head()

StarcoderdataJupyterScriptsDedupFiltered