sqlite - How to get table.colname dataframe results using SQL Achemy / Pandas? -


i have join sql request output of 2 tables produced :

 ss= 'select t.*, p.* table1 t, table1 p t.table2_id=p.table1_id'  df = pd.read_sql_query(ss, self.db_con) 

however, columns have same name since table stripped. (ex: id, id ...)

how table.colname in dataframe ?

thanks

you have rename conflicting columns as:

select t.id t_id, p.id p_id, table1 t, table2 p t.id = p.id 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -