Skip to content

docs: update Session doctrings to include exceptions #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 12, 2024
4 changes: 2 additions & 2 deletions bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions third_party/bigframes_vendored/pandas/io/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions third_party/bigframes_vendored/pandas/io/parsers/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)