Answers for "import database pandas"

2

read database pandas

from sqlalchemy import create_engine

engine = create_engine("sqlite:///data.db")

query = """
SELECT * 
  FROM weather;
"""

weather = pd.read_sql(query, engine)
Posted by: Guest on July-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language