mydb = create_engine('postgresql://user@host.domain:5432/database')
df = pd.read_sql_query(
    "SELECT sections, count(id) FROM table WHERE created_at <'2016-01-01' GROUP BY sections ORDER BY 2 DESC LIMIT 10"
    , con=mydb)
Workflow for adding new columns from Pandas to SQLite tables