diff --git a/bigframes/pandas/__init__.py b/bigframes/pandas/__init__.py index 9c3c98ec55..395b573916 100644 --- a/bigframes/pandas/__init__.py +++ b/bigframes/pandas/__init__.py @@ -163,7 +163,8 @@ def get_default_session_id() -> str: the table id of all temporary tables created in the global session. Returns: - str, the default global session id, ex. 'sessiona1b2c' + str: + The default global session id, ex. 'sessiona1b2c' """ return get_global_session().session_id diff --git a/bigframes/session/__init__.py b/bigframes/session/__init__.py index edac7efa4b..4f59e2fdd1 100644 --- a/bigframes/session/__init__.py +++ b/bigframes/session/__init__.py @@ -1370,13 +1370,14 @@ def remote_function( `all`, `internal-only`, `internal-and-gclb`. See for more details https://cloud.google.com/functions/docs/networking/network-settings#ingress_settings. Returns: - callable: A remote function object pointing to the cloud assets created - in the background to support the remote execution. The cloud assets can be - located through the following properties set in the object: + collections.abc.Callable: + A remote function object pointing to the cloud assets created + in the background to support the remote execution. The cloud assets can be + located through the following properties set in the object: - `bigframes_cloud_function` - The google cloud function deployed for the user defined code. + `bigframes_cloud_function` - The google cloud function deployed for the user defined code. - `bigframes_remote_function` - The bigquery remote function capable of calling into `bigframes_cloud_function`. + `bigframes_remote_function` - The bigquery remote function capable of calling into `bigframes_cloud_function`. """ return self._remote_function_session.remote_function( input_types, @@ -1545,12 +1546,13 @@ def read_gbq_function( a pandas Series. Returns: - callable: A function object pointing to the BigQuery function read - from BigQuery. + collections.abc.Callable: + A function object pointing to the BigQuery function read + from BigQuery. - The object is similar to the one created by the `remote_function` - decorator, including the `bigframes_remote_function` property, but - not including the `bigframes_cloud_function` property. + The object is similar to the one created by the `remote_function` + decorator, including the `bigframes_remote_function` property, but + not including the `bigframes_cloud_function` property. """ return bigframes_rf.read_gbq_function( diff --git a/third_party/bigframes_vendored/pandas/core/reshape/encoding.py b/third_party/bigframes_vendored/pandas/core/reshape/encoding.py index b7f67473ea..31b2ba4a59 100644 --- a/third_party/bigframes_vendored/pandas/core/reshape/encoding.py +++ b/third_party/bigframes_vendored/pandas/core/reshape/encoding.py @@ -113,8 +113,9 @@ def get_dummies( Data type for new columns. Only a single dtype is allowed. Returns: - DataFrame: Dummy-coded data. If data contains other columns than the - dummy-coded one(s), these will be prepended, unaltered, to the - result. + bigframes.pandas.DataFrame: + Dummy-coded data. If data contains other columns than the + dummy-coded one(s), these will be prepended, unaltered, to the + result. """ raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE) diff --git a/third_party/bigframes_vendored/pandas/core/reshape/merge.py b/third_party/bigframes_vendored/pandas/core/reshape/merge.py index 704e50f516..66fb2c2160 100644 --- a/third_party/bigframes_vendored/pandas/core/reshape/merge.py +++ b/third_party/bigframes_vendored/pandas/core/reshape/merge.py @@ -74,6 +74,7 @@ def merge( no suffix. At least one of the values must not be None. Returns: - bigframes.dataframe.DataFrame: A DataFrame of the two merged objects. + bigframes.pandas.DataFrame: + A DataFrame of the two merged objects. """ raise NotImplementedError("abstract method") diff --git a/third_party/bigframes_vendored/pandas/core/reshape/tile.py b/third_party/bigframes_vendored/pandas/core/reshape/tile.py index 6ba3950a76..6bda14b025 100644 --- a/third_party/bigframes_vendored/pandas/core/reshape/tile.py +++ b/third_party/bigframes_vendored/pandas/core/reshape/tile.py @@ -28,6 +28,7 @@ def cut( >>> import bigframes.pandas as bpd >>> bpd.options.display.progress_bar = None + >>> s = bpd.Series([0, 1, 5, 10]) >>> s 0 0 @@ -108,7 +109,8 @@ def cut( bins. This affects the type of the output container. Returns: - Series: A Series representing the respective bin for each value + bigframes.pandas.Series: + A Series representing the respective bin for each value of `x`. The type depends on the value of `labels`. sequence of scalars : returns a Series for Series `x` or a Categorical for all other inputs. The values stored within @@ -140,7 +142,8 @@ def qcut(x, q, *, labels=None, duplicates="error"): If bin edges are not unique, raise ValueError or drop non-uniques. Returns: - Series: Categorical or Series of integers if labels is False + bigframes.pandas.Series: + Categorical or Series of integers if labels is False The return type (Categorical or Series) depends on the input: a Series of type category if input is a Series else Categorical. Bins are represented as categories when categorical data is returned. diff --git a/third_party/bigframes_vendored/pandas/core/tools/datetimes.py b/third_party/bigframes_vendored/pandas/core/tools/datetimes.py index 52b287b949..d6048d1208 100644 --- a/third_party/bigframes_vendored/pandas/core/tools/datetimes.py +++ b/third_party/bigframes_vendored/pandas/core/tools/datetimes.py @@ -71,6 +71,7 @@ def to_datetime( float number. Returns: - Timestamp, datetime.datetime or bigframes.series.Series: Return type depends on input. + Union[pandas.Timestamp, datetime.datetime or bigframes.pandas.Series]: + Return type depends on input. """ raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE) diff --git a/third_party/bigframes_vendored/pandas/io/gbq.py b/third_party/bigframes_vendored/pandas/io/gbq.py index b4dd10ef10..aa4d862b65 100644 --- a/third_party/bigframes_vendored/pandas/io/gbq.py +++ b/third_party/bigframes_vendored/pandas/io/gbq.py @@ -167,6 +167,7 @@ def read_gbq( from a table. Returns: - bigframes.pandas.DataFrame: A DataFrame representing results of the query or table. + bigframes.pandas.DataFrame: + A DataFrame representing results of the query or table. """ raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE) diff --git a/third_party/bigframes_vendored/pandas/io/parsers/readers.py b/third_party/bigframes_vendored/pandas/io/parsers/readers.py index 3ad810fa2e..2b1e3dd70b 100644 --- a/third_party/bigframes_vendored/pandas/io/parsers/readers.py +++ b/third_party/bigframes_vendored/pandas/io/parsers/readers.py @@ -152,7 +152,8 @@ def read_csv( keyword arguments for `pandas.read_csv` when not using the BigQuery engine. Returns: - bigframes.pandas.DataFrame: A BigQuery DataFrames. + bigframes.pandas.DataFrame: + A BigQuery DataFrames. Raises: bigframes.exceptions.DefaultIndexWarning: