From 54bf64c905677436c7f82cda0178a1e8caca8055 Mon Sep 17 00:00:00 2001 From: Arwa Date: Tue, 5 Nov 2024 11:29:53 -0600 Subject: [PATCH] docs: update Session doctrings to include exceptions --- bigframes/session/__init__.py | 4 ++-- third_party/bigframes_vendored/pandas/io/gbq.py | 5 +++++ third_party/bigframes_vendored/pandas/io/parsers/readers.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bigframes/session/__init__.py b/bigframes/session/__init__.py index 004f5d322b..1c8d497974 100644 --- a/bigframes/session/__init__.py +++ b/bigframes/session/__init__.py @@ -500,7 +500,7 @@ def read_gbq_query( Raises: ValueError: - When both columns (preferred) and col_order are specified. + When both ``columns`` and ``col_order`` are specified. """ # NOTE: This method doesn't (yet) exist in pandas or pandas-gbq, so # these docstrings are inline. @@ -552,7 +552,7 @@ def read_gbq_table( Raises: ValueError: - When both columns (preferred) and col_order are specified. + When both ``columns`` and ``col_order`` are specified. """ # NOTE: This method doesn't (yet) exist in pandas or pandas-gbq, so # these docstrings are inline. diff --git a/third_party/bigframes_vendored/pandas/io/gbq.py b/third_party/bigframes_vendored/pandas/io/gbq.py index 4bd4353413..b4dd10ef10 100644 --- a/third_party/bigframes_vendored/pandas/io/gbq.py +++ b/third_party/bigframes_vendored/pandas/io/gbq.py @@ -160,6 +160,11 @@ def read_gbq( bigframes.exceptions.DefaultIndexWarning: Using the default index is discouraged, such as with clustered or partitioned tables without primary keys. + ValueError: + When both ``columns`` and ``col_order`` are specified. + ValueError: + If ``configuration`` is specified when directly reading + from a table. Returns: bigframes.pandas.DataFrame: A DataFrame representing results of the query or table. diff --git a/third_party/bigframes_vendored/pandas/io/parsers/readers.py b/third_party/bigframes_vendored/pandas/io/parsers/readers.py index 90154d8a00..910d3ad083 100644 --- a/third_party/bigframes_vendored/pandas/io/parsers/readers.py +++ b/third_party/bigframes_vendored/pandas/io/parsers/readers.py @@ -237,5 +237,7 @@ def read_json( bigframes.exceptions.DefaultIndexWarning: Using the default index is discouraged, such as with clustered or partitioned tables without primary keys. + ValueError: + ``lines`` is only valid when ``orient`` is ``records``. """ raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)