Skip to content

Can't handle duplicate column names in sql read #3487

Closed
@darindillon

Description

@darindillon

Possibly related to #3468

Using pandas 0.10.1.
It's legal for sql (at least Sql Server) to have queries that return two columns with the same name. And it's legal for pandas to have dataframes that have two columns with the same name. But pandas gives a very misleading error message when you try it with read_frame:

Query that has 2 columns with the same name:

sql = "select 1 as whatever, 2 as name, 3 as name where 1=0"
pos = pandas.io.sql.read_frame(sql, dbconn)

That gives very misleading error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions