Releases: googleapis/python-bigquery-pandas
Releases · googleapis/python-bigquery-pandas
Version 0.15.0
Features
- Load DataFrame with
to_gbq
to a table in a project different from
the API client project. Specify the target table ID as
project.dataset.table
to use this feature. (#321, #347) - Allow billing project to be separate from destination table project
into_gbq
. (#321)
Bug fixes
- Avoid 403 error from
to_gbq
when table haspolicyTags
. (#354) - Avoid
client.dataset
deprecation warnings. (#312)
Dependencies
Version 0.14.1
Version 0.14.0
0.14.0 / 2020-10-05
- Add
dtypes
argument toread_gbq
. Use this argument to override
the defaultdtype
for a particular column in the query results.
For example, this can be used to select nullable integer columns as
theInt64
nullable integer pandas extension type. (#242, #332)
df = pandas_gbq.read_gbq(
"SELECT CAST(NULL AS INT64) AS null_integer",
dtypes={"null_integer": "Int64"},
)
Dependency updates
- Support
google-cloud-bigquery-storage
2.0 and higher. (#329) - Update the minimum version of
pandas
to 0.20.1. (#331)
Internal changes
- Update tests to run against Python 3.8. (#331)
Version 0.13.3
Version 0.13.1
Version 0.13.0
- Raise NotImplementedError when the deprecated
private_key
argument is used. (#301)
Version 0.12.0
New features
- Add
max_results
argument topandas_gbq.read_gbq()
. Use this
argument to limit the number of rows in the results DataFrame. Set
max_results
to 0 to ignore query outputs, such as for DML or DDL
queries. (#102) - Add
progress_bar_type
argument topandas_gbq.read_gbq()
. Use
this argument to display a progress bar when downloading data.
(#182)
Dependency updates
- Update the minimum version of
google-cloud-bigquery
to 1.11.1.
(#296)
Documentation
- Add code samples to introduction and refactor how-to guides. (#239)
Bug fixes
- Fix resource leak with
use_bqstorage_api
by closing BigQuery Storage API client after use. (#294)
Version 0.11.0
- Breaking Change: Python 2 support has been dropped. This is to align
with the pandas package which dropped Python 2 support at the end of 2019.
(#268)
Enhancements
- Ensure
table_schema
argument is not modified inplace. (:issue:278
)
Implementation changes
- Use object dtype for
STRING
,ARRAY
, andSTRUCT
columns when
there are zero rows. (#285)
Internal changes
Version 0.10.0
Documentation
- Document BigQuery data type to pandas dtype conversion for
read_gbq
. ( #269 )
Dependency updates
- Update the minimum version of
google-cloud-bigquery
to 1.9.0. ( #247 ) - Update the minimum version of
pandas
to 0.19.0. ( #262 )
Internal changes
- Update the authentication credentials. Note: You may need to set
reauth=True
in order to update your credentials to the most recent version. This is required to use new functionality such as the BigQuery Storage API. ( #267 ) - Use
to_dataframe()
fromgoogle-cloud-bigquery
in theread_gbq()
function. ( #247 )
Enhancements
- Fix a bug where pandas-gbq could not upload an empty DataFrame. ( #237 )
- Allow table_schema in
to_gbq
to contain only a subset of columns, with the rest being populated using the DataFrame dtypes ( #218 ) (contributed by @JohnPaton) - Read
project_id
into_gbq
from provided credentials if available (contributed by @daureg) read_gbq
uses the timezone-awareDatetimeTZDtype(unit='ns', tz='UTC')
dtype for BigQueryTIMESTAMP
columns. ( #269 )- Add
use_bqstorage_api
toread_gbq
. The BigQuery Storage API can be used to download large query results (>125 MB) more quickly. If the BQ Storage API can't be used, the BigQuery API is used instead. ( #133, #270 )