Skip to content

read_sql_* methods should accept dtype argument with same type as DataFrame.astype() #676

Closed
@Dr-Irv

Description

@Dr-Irv

For the read_sql_* methods, the argument dtype is just passed to DataFrame.astype(), where we allow dtype: AstypeArg | Mapping[Any, Dtype] | Series, so the read_sql_*() methods should do the same.

In particular, doing something like dtype: {"col": "str"} is totally allowed, but not permitted in the stubs.

pandas-stubs version 2.0.1.230501

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions