How to get table column-name/header for SQL query in python
问题 I have the data in pandas dataframe which I am storing in SQLITE database using Python. When I am trying to query the tables inside it, I am able to get the results but without the column names. Can someone please guide me. sql_query = """Select date(report_date), insertion_order_id, sum(impressions), sum(clicks), (sum(clicks)+0.0)/sum(impressions)*100 as CTR from RawDailySummaries Group By report_date, insertion_order_id Having report_date like '2014-08-12%' """ cursor.execute(sql_query)