for section in df['sections']:
    df2 = pd.read_sql_query(
        """SELECT sections, name, created_at, updated_at, status 
                              FROM table 
                              WHERE created_at <'2016-01-01'   
                                  AND sections=%(section)s 
                              ORDER BY created_at"""
        , con=mydb, params=dict(section=section))
Workflow for adding new columns from Pandas to SQLite tables