Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 89a1c67

Browse files
authoredDec 5, 2023
docs: Fix return annotation in API docstrings (#253)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes internal issue 314367409 🦕
1 parent 77074ec commit 89a1c67

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed
 

‎third_party/bigframes_vendored/pandas/core/frame.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def from_dict(
226226
if used with ``orient='columns'`` or ``orient='tight'``.
227227
228228
Returns:
229-
DataFrame
229+
DataFrame: DataFrame.
230230
"""
231231
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
232232

@@ -267,7 +267,7 @@ def from_records(
267267
Number of rows to read if data is an iterator.
268268
269269
Returns:
270-
DataFrame
270+
DataFrame: DataFrame.
271271
"""
272272
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
273273

@@ -717,7 +717,7 @@ def to_markdown(
717717
These parameters will be passed to `tabulate <https://pypi.org/project/tabulate>`_.
718718
719719
Returns:
720-
DataFrame in Markdown-friendly format.
720+
DataFrame: DataFrame in Markdown-friendly format.
721721
"""
722722
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
723723

@@ -1272,7 +1272,7 @@ def sort_values(
12721272
if `first`; `last` puts NaNs at the end.
12731273
12741274
Returns:
1275-
DataFrame with sorted values.
1275+
DataFrame: DataFrame with sorted values.
12761276
"""
12771277
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
12781278

@@ -1282,7 +1282,7 @@ def sort_index(
12821282
"""Sort object by labels (along an axis).
12831283
12841284
Returns:
1285-
The original DataFrame sorted by the labels.
1285+
DataFrame: The original DataFrame sorted by the labels.
12861286
"""
12871287
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
12881288

@@ -1330,7 +1330,7 @@ def eq(self, other, axis: str | int = "columns") -> DataFrame:
13301330
(1 or 'columns').
13311331
13321332
Returns:
1333-
Result of the comparison.
1333+
DataFrame: Result of the comparison.
13341334
"""
13351335
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
13361336

@@ -1861,7 +1861,7 @@ def rtruediv(self, other, axis: str | int = "columns") -> DataFrame:
18611861
(1 or 'columns'). For Series input, axis to match Series index on.
18621862
18631863
Returns:
1864-
DataFrame result of the arithmetic operation.
1864+
DataFrame: DataFrame result of the arithmetic operation.
18651865
"""
18661866
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
18671867

@@ -2796,7 +2796,7 @@ def any(self, *, axis=0, bool_only: bool = False):
27962796
Include only boolean columns.
27972797
27982798
Returns:
2799-
Series
2799+
bigframes.series.Series: Series indicating if any element is True per column.
28002800
"""
28012801
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
28022802

@@ -2843,7 +2843,7 @@ def all(self, axis=0, *, bool_only: bool = False):
28432843
Include only boolean columns.
28442844
28452845
Returns:
2846-
bigframes.series.Series: Series if all elements are True.
2846+
bigframes.series.Series: Series indicating if all elements are True per column.
28472847
"""
28482848
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
28492849

@@ -3184,7 +3184,7 @@ def skew(self, *, numeric_only: bool = False):
31843184
Include only float, int, boolean columns.
31853185
31863186
Returns:
3187-
Series
3187+
Series: Series.
31883188
"""
31893189
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
31903190

@@ -3225,7 +3225,7 @@ def kurt(self, *, numeric_only: bool = False):
32253225
Include only float, int, boolean columns.
32263226
32273227
Returns:
3228-
Series
3228+
Series: Series.
32293229
"""
32303230
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
32313231

@@ -3770,7 +3770,7 @@ def pivot(self, *, columns, index=None, values=None):
37703770
have hierarchically indexed columns.
37713771
37723772
Returns:
3773-
Returns reshaped DataFrame.
3773+
DataFrame: Returns reshaped DataFrame.
37743774
"""
37753775
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
37763776

@@ -3808,7 +3808,7 @@ def unstack(self):
38083808
(the analogue of stack when the columns are not a MultiIndex).
38093809
38103810
Returns:
3811-
DataFrame or Series
3811+
DataFrame or Series: DataFrame or Series.
38123812
"""
38133813
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
38143814

@@ -3866,7 +3866,7 @@ def index(self):
38663866
dtype=object)
38673867
38683868
Returns:
3869-
The index labels of the DataFrame.
3869+
Index: The index object of the DataFrame.
38703870
"""
38713871
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
38723872

@@ -4115,7 +4115,7 @@ def dot(self, other):
41154115
The other object to compute the matrix product with.
41164116
41174117
Returns:
4118-
Series or DataFrame
4118+
Series or DataFrame:
41194119
If `other` is a Series, return the matrix product between self and
41204120
other as a Series. If other is a DataFrame, return
41214121
the matrix product of self and other in a DataFrame.

‎third_party/bigframes_vendored/pandas/core/series.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def index(self):
9090
dtype=object)
9191
9292
Returns:
93-
The index labels of the Series.
93+
Index: The index object of the Series.
9494
"""
9595
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
9696

@@ -138,7 +138,7 @@ def transpose(self) -> Series:
138138
Return the transpose, which is by definition self.
139139
140140
Returns:
141-
Series
141+
Series: Series.
142142
"""
143143
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
144144

@@ -593,7 +593,7 @@ def corr(self, other, method="pearson", min_periods=None) -> float:
593593
are not yet supported, so a result will be returned for at least two observations.
594594
595595
Returns:
596-
float; Will return NaN if there are fewer than two numeric pairs, either series has a
596+
float: Will return NaN if there are fewer than two numeric pairs, either series has a
597597
variance or covariance of zero, or any input value is infinite.
598598
"""
599599
raise NotImplementedError("abstract method")
@@ -611,7 +611,7 @@ def diff(self) -> Series:
611611
values.
612612
613613
Returns:
614-
{klass}: First differences of the Series.
614+
Series: First differences of the Series.
615615
"""
616616
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
617617

@@ -1317,7 +1317,7 @@ def le(self, other) -> Series:
13171317
other: Series, or scalar value
13181318
13191319
Returns:
1320-
bigframes.series.Series. The result of the comparison.
1320+
bigframes.series.Series: The result of the comparison.
13211321
13221322
"""
13231323
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
@@ -1331,7 +1331,7 @@ def lt(self, other) -> Series:
13311331
Args:
13321332
other (Series, or scalar value):
13331333
1334-
Returns:
1334+
Returns:
13351335
bigframes.series.Series: The result of the operation.
13361336
13371337
"""
@@ -1588,7 +1588,7 @@ def divmod(self, other) -> Series:
15881588
other: Series, or scalar value
15891589
15901590
Returns:
1591-
2-Tuple of Series. The result of the operation. The result is always
1591+
2-Tuple of Series: The result of the operation. The result is always
15921592
consistent with (floordiv, mod) (though pandas may not).
15931593
15941594
"""
@@ -1603,7 +1603,7 @@ def rdivmod(self, other) -> Series:
16031603
other: Series, or scalar value
16041604
16051605
Returns:
1606-
2-Tuple of Series. The result of the operation. The result is always
1606+
2-Tuple of Series: The result of the operation. The result is always
16071607
consistent with (rfloordiv, rmod) (though pandas may not).
16081608
16091609
"""
@@ -1650,7 +1650,7 @@ def max(
16501650
16511651
16521652
Returns:
1653-
scalar or scalar
1653+
scalar: Scalar.
16541654
"""
16551655
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
16561656

@@ -1664,7 +1664,7 @@ def min(
16641664
of the ``numpy.ndarray`` method ``argmin``.
16651665
16661666
Returns:
1667-
scalar or scalar
1667+
scalar: Scalar.
16681668
"""
16691669
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
16701670

@@ -1692,7 +1692,7 @@ def var(
16921692
Normalized by N-1 by default.
16931693
16941694
Returns:
1695-
scalar or Series (if level specified)
1695+
scalar or Series (if level specified): Variance.
16961696
"""
16971697
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
16981698

@@ -1702,15 +1702,15 @@ def sum(self):
17021702
This is equivalent to the method ``numpy.sum``.
17031703
17041704
Returns:
1705-
scalar
1705+
scalar: Scalar.
17061706
"""
17071707
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17081708

17091709
def mean(self):
17101710
"""Return the mean of the values over the requested axis.
17111711
17121712
Returns:
1713-
scalar
1713+
scalar: Scalar.
17141714
"""
17151715
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17161716

@@ -1723,15 +1723,15 @@ def median(self, *, exact: bool = False):
17231723
one. Note: ``exact=True`` not yet supported.
17241724
17251725
Returns:
1726-
scalar
1726+
scalar: Scalar.
17271727
"""
17281728
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17291729

17301730
def prod(self):
17311731
"""Return the product of the values over the requested axis.
17321732
17331733
Returns:
1734-
scalar
1734+
scalar: Scalar.
17351735
"""
17361736
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17371737

@@ -1741,7 +1741,7 @@ def skew(self):
17411741
Normalized by N-1.
17421742
17431743
Returns:
1744-
scalar
1744+
scalar: Scalar.
17451745
"""
17461746
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17471747

@@ -1932,7 +1932,7 @@ def clip(self):
19321932
Maximum threshold value. All values above this threshold will be set to it. A missing threshold (e.g NA) will not clip the value.
19331933
19341934
Returns:
1935-
Series.
1935+
Series: Series.
19361936
"""
19371937
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
19381938

@@ -2083,7 +2083,7 @@ def is_monotonic_increasing(self) -> bool:
20832083
Return boolean if values in the object are monotonically increasing.
20842084
20852085
Returns:
2086-
bool
2086+
bool: Boolean.
20872087
"""
20882088
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
20892089

@@ -2093,7 +2093,7 @@ def is_monotonic_decreasing(self) -> bool:
20932093
Return boolean if values in the object are monotonically decreasing.
20942094
20952095
Returns:
2096-
bool
2096+
bool: Boolean.
20972097
"""
20982098
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
20992099

0 commit comments

Comments
 (0)
Failed to load comments.