Skip to content

Suggestion: a dtype argument for read_sql #6798

Closed
@Midnighter

Description

@Midnighter

The pandas.io.sql module has a convenient read_frame function which has been of great use to me. The function has an argument coerce_float. I propose to make that more general akin to the pandas.DataFrame initialization method which has an argument dtype. This would allow passing a dict with column names as keys and the desired data type as values. Columns not in the dict would be inferred normally.

If this is not planned but desired I can look into patching that myself.

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