diff --git a/samples/snippets/quickstart.py b/samples/snippets/quickstart.py index a15ea16853..ae3a934004 100644 --- a/samples/snippets/quickstart.py +++ b/samples/snippets/quickstart.py @@ -29,8 +29,9 @@ def run_quickstart(project_id: str): import bigframes.pandas as bpd # Set BigQuery DataFrames options + # Note: The project option is not required in all environments. + # On BigQuery Studio, the project ID is automatically detected. bpd.options.bigquery.project = your_gcp_project_id - bpd.options.bigquery.location = "us" # Create a DataFrame from a BigQuery table query_or_table = "bigquery-public-data.ml_datasets.penguins" diff --git a/samples/snippets/set_options_test.py b/samples/snippets/set_options_test.py index ef6f41ce54..f981009e9a 100644 --- a/samples/snippets/set_options_test.py +++ b/samples/snippets/set_options_test.py @@ -26,7 +26,14 @@ def test_bigquery_dataframes_set_options(): REGION = "US" # @param {type:"string"} # Set BigQuery DataFrames options + # Note: The project option is not required in all environments. + # On BigQuery Studio, the project ID is automatically detected. bpd.options.bigquery.project = PROJECT_ID + + # Note: The location option is not required. + # It defaults to the location of the first table or query + # passed to read_gbq(). For APIs where a location can't be + # auto-detected, the location defaults to the "US" location. bpd.options.bigquery.location = REGION # [END bigquery_dataframes_set_options]