diff --git a/bigframes/_config/__init__.py b/bigframes/_config/__init__.py index 775ef70bc7..52b47e3e9a 100644 --- a/bigframes/_config/__init__.py +++ b/bigframes/_config/__init__.py @@ -56,12 +56,21 @@ class Options: """Global options affecting BigQuery DataFrames behavior.""" def __init__(self): + self.reset() + + def reset(self) -> Options: + """Reset the option settings to defaults. + + Returns: + bigframes._config.Options: Options object with default values. + """ self._local = ThreadLocalConfig() # BigQuery options are special because they can only be set once per # session, so we need an indicator as to whether we are using the # thread-local session or the global session. self._bigquery_options = bigquery_options.BigQueryOptions() + return self def _init_bigquery_thread_local(self): """Initialize thread-local options, based on current global options.""" diff --git a/samples/snippets/quickstart.py b/samples/snippets/quickstart.py index 8b3b08884a..bc05cd2512 100644 --- a/samples/snippets/quickstart.py +++ b/samples/snippets/quickstart.py @@ -74,4 +74,4 @@ def run_quickstart(project_id: str) -> None: # close session and reset option so not to affect other tests bpd.close_session() - bpd.options.bigquery.ordering_mode = "strict" + bpd.options.reset()