Skip to content

ENH: add dtypes argument to read_gbq #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Oct 2, 2020

Use this argument to override the default dtype for a particular column in
the query results. For example, this can be used to select nullable integer
columns as the Int64 nullable integer pandas extension type.

df = gbq.read_gbq(
    "SELECT CAST(NULL AS INT64) AS null_integer",
    dtypes={"null_integer": "Int64"},
)
  • closes #xxxx
  • tests added / passed
  • passes nox -s blacken lint
  • docs/source/changelog.rst entry

Closes #332
Closes #242

Use this argument to override the default ``dtype`` for a particular column in
the query results. For example, this can be used to select nullable integer
columns as the ``Int64`` nullable integer pandas extension type.

    df = gbq.read_gbq(
        "SELECT CAST(NULL AS INT64) AS null_integer",
        dtypes={"null_integer": "Int64"},
    )
@tswast tswast merged commit 46c579a into googleapis:master Oct 2, 2020
@tswast tswast deleted the issue332-nullable-integer branch October 2, 2020 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant