Answers for "pandas database"

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
1

how to transfer pandas datafra,e to sqlite

import sqlite3 as db
# Create your connection.
conn = db.connect('connection_name')
df.to_sql(name='table_name', con=conn)
Posted by: Guest on September-03-2020

Code answers related to "pandas database"

Python Answers by Framework

Browse Popular Code Answers by Language