Skip to content

read_sql_table bug on columns with dots #10279

Closed
@Gerenuk

Description

@Gerenuk

read_sql_table handles columns with dots in the name incorrectly (removes name before dot)

from sqlalchemy import create_engine
import pandas as pd
engine = create_engine('sqlite://')
conn = engine.connect()
conn.execute("create table test (a int, `b.c` int)")
conn.execute("insert into test values (1,2)")
df = pd.read_sql_table("test", engine)
print(df)

->

    a  c
0  1  2

Metadata

Metadata

Assignees

No one assigned

    Labels

    IO SQLto_sql, read_sql, read_sql_query

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions