Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: Fix return annotation in API docstrings #253

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 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions 30 third_party/bigframes_vendored/pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def from_dict(
if used with ``orient='columns'`` or ``orient='tight'``.

Returns:
DataFrame
DataFrame: DataFrame.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -267,7 +267,7 @@ def from_records(
Number of rows to read if data is an iterator.

Returns:
DataFrame
DataFrame: DataFrame.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -717,7 +717,7 @@ def to_markdown(
These parameters will be passed to `tabulate <https://pypi.org/project/tabulate>`_.

Returns:
DataFrame in Markdown-friendly format.
DataFrame: DataFrame in Markdown-friendly format.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1272,7 +1272,7 @@ def sort_values(
if `first`; `last` puts NaNs at the end.

Returns:
DataFrame with sorted values.
DataFrame: DataFrame with sorted values.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -1282,7 +1282,7 @@ def sort_index(
"""Sort object by labels (along an axis).

Returns:
The original DataFrame sorted by the labels.
DataFrame: The original DataFrame sorted by the labels.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1330,7 +1330,7 @@ def eq(self, other, axis: str | int = "columns") -> DataFrame:
(1 or 'columns').

Returns:
Result of the comparison.
DataFrame: Result of the comparison.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1861,7 +1861,7 @@ def rtruediv(self, other, axis: str | int = "columns") -> DataFrame:
(1 or 'columns'). For Series input, axis to match Series index on.

Returns:
DataFrame result of the arithmetic operation.
DataFrame: DataFrame result of the arithmetic operation.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -2796,7 +2796,7 @@ def any(self, *, axis=0, bool_only: bool = False):
Include only boolean columns.

Returns:
Series
bigframes.series.Series: Series indicating if any element is True per column.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -2843,7 +2843,7 @@ def all(self, axis=0, *, bool_only: bool = False):
Include only boolean columns.

Returns:
bigframes.series.Series: Series if all elements are True.
bigframes.series.Series: Series indicating if all elements are True per column.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -3184,7 +3184,7 @@ def skew(self, *, numeric_only: bool = False):
Include only float, int, boolean columns.

Returns:
Series
Series: Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -3225,7 +3225,7 @@ def kurt(self, *, numeric_only: bool = False):
Include only float, int, boolean columns.

Returns:
Series
Series: Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -3770,7 +3770,7 @@ def pivot(self, *, columns, index=None, values=None):
have hierarchically indexed columns.

Returns:
Returns reshaped DataFrame.
DataFrame: Returns reshaped DataFrame.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -3808,7 +3808,7 @@ def unstack(self):
(the analogue of stack when the columns are not a MultiIndex).

Returns:
DataFrame or Series
DataFrame or Series: DataFrame or Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -3866,7 +3866,7 @@ def index(self):
dtype=object)

Returns:
The index labels of the DataFrame.
Index: The index object of the DataFrame.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -4115,7 +4115,7 @@ def dot(self, other):
The other object to compute the matrix product with.

Returns:
Series or DataFrame
Series or DataFrame:
If `other` is a Series, return the matrix product between self and
other as a Series. If other is a DataFrame, return
the matrix product of self and other in a DataFrame.
Expand Down
38 changes: 19 additions & 19 deletions 38 third_party/bigframes_vendored/pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def index(self):
dtype=object)

Returns:
The index labels of the Series.
Index: The index object of the Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -138,7 +138,7 @@ def transpose(self) -> Series:
Return the transpose, which is by definition self.

Returns:
Series
Series: Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -593,7 +593,7 @@ def corr(self, other, method="pearson", min_periods=None) -> float:
are not yet supported, so a result will be returned for at least two observations.

Returns:
float; Will return NaN if there are fewer than two numeric pairs, either series has a
float: Will return NaN if there are fewer than two numeric pairs, either series has a
variance or covariance of zero, or any input value is infinite.
"""
raise NotImplementedError("abstract method")
Expand All @@ -611,7 +611,7 @@ def diff(self) -> Series:
values.

Returns:
{klass}: First differences of the Series.
Series: First differences of the Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1317,7 +1317,7 @@ def le(self, other) -> Series:
other: Series, or scalar value

Returns:
bigframes.series.Series. The result of the comparison.
bigframes.series.Series: The result of the comparison.

"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
Expand All @@ -1331,7 +1331,7 @@ def lt(self, other) -> Series:
Args:
other (Series, or scalar value):

Returns:
Returns:
bigframes.series.Series: The result of the operation.

"""
Expand Down Expand Up @@ -1588,7 +1588,7 @@ def divmod(self, other) -> Series:
other: Series, or scalar value

Returns:
2-Tuple of Series. The result of the operation. The result is always
2-Tuple of Series: The result of the operation. The result is always
consistent with (floordiv, mod) (though pandas may not).

"""
Expand All @@ -1603,7 +1603,7 @@ def rdivmod(self, other) -> Series:
other: Series, or scalar value

Returns:
2-Tuple of Series. The result of the operation. The result is always
2-Tuple of Series: The result of the operation. The result is always
consistent with (rfloordiv, rmod) (though pandas may not).

"""
Expand Down Expand Up @@ -1650,7 +1650,7 @@ def max(


Returns:
scalar or scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -1664,7 +1664,7 @@ def min(
of the ``numpy.ndarray`` method ``argmin``.

Returns:
scalar or scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1692,7 +1692,7 @@ def var(
Normalized by N-1 by default.

Returns:
scalar or Series (if level specified)
scalar or Series (if level specified): Variance.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -1702,15 +1702,15 @@ def sum(self):
This is equivalent to the method ``numpy.sum``.

Returns:
scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

def mean(self):
"""Return the mean of the values over the requested axis.

Returns:
scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -1723,15 +1723,15 @@ def median(self, *, exact: bool = False):
one. Note: ``exact=True`` not yet supported.

Returns:
scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

def prod(self):
"""Return the product of the values over the requested axis.

Returns:
scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -1741,7 +1741,7 @@ def skew(self):
Normalized by N-1.

Returns:
scalar
scalar: Scalar.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -1932,7 +1932,7 @@ def clip(self):
Maximum threshold value. All values above this threshold will be set to it. A missing threshold (e.g NA) will not clip the value.

Returns:
Series.
Series: Series.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down Expand Up @@ -2083,7 +2083,7 @@ def is_monotonic_increasing(self) -> bool:
Return boolean if values in the object are monotonically increasing.

Returns:
bool
bool: Boolean.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand All @@ -2093,7 +2093,7 @@ def is_monotonic_decreasing(self) -> bool:
Return boolean if values in the object are monotonically decreasing.

Returns:
bool
bool: Boolean.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.