pd.read_sql(sql) If sql has two columns of the same field, the result is only one column of fields
pd.read_sql() dont work ?
import pandas as pd
sql = "select name, name, age from table;"
df = pd.read_sql(sql, con)
print(df.columns)
# name, age
it work
with conn.cursor() as a:
a.execute(sql)
lines = a.fetchall()
df = pd.DataFrame(lines)