Skip to content

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