try:
conn.row_factory = sqlite3.Row c = conn.cursor() c.execute('select * from stocks') r = c.fetchone() print c.description # This will print the columns names >>> (('date', None, None, None, None, None, None), ('trans', None, None, None, None, None, None), ('symbol', None, None, None, None, None, None), ('qty', None, None, None, None, None, None), ('price', None, None, None, None, None, None))
As explained here , only the first elements of each 7-tuple are useful.
CΓ©dric julien
source share