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 751266e

Browse files
authoredMar 22, 2024
docs: improve API documentation (#489)
This is a bunch of miscellaneous doc rendering issues I came across. 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 #<issue_number_goes_here> 🦕
1 parent 85cede2 commit 751266e

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed
 

‎third_party/bigframes_vendored/pandas/core/arrays/datetimelike.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def strftime(self, date_format: str):
3333
Date format string (e.g. "%Y-%m-%d").
3434
3535
Returns:
36-
bigframes.series.Series of formatted strings.
36+
bigframes.series.Series: Series of formatted strings.
3737
"""
3838
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
3939

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

+16-17
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ def align(
11411141
11421142
Args:
11431143
other (DataFrame or Series):
1144-
join ({{'outer', 'inner', 'left', 'right'}}, default 'outer'):
1144+
join ({'outer', 'inner', 'left', 'right'}, default 'outer'):
11451145
Type of alignment to be performed.
11461146
left: use only keys from left frame, preserve key order.
11471147
right: use only keys from right frame, preserve key order.
@@ -1627,9 +1627,6 @@ def keys(self):
16271627
16281628
This is index for Series, columns for DataFrame.
16291629
1630-
Returns:
1631-
Index: Info axis.
1632-
16331630
**Examples:**
16341631
16351632
>>> import bigframes.pandas as bpd
@@ -1641,6 +1638,9 @@ def keys(self):
16411638
... })
16421639
>>> df.keys()
16431640
Index(['A', 'B'], dtype='object')
1641+
1642+
Returns:
1643+
Index: Info axis.
16441644
"""
16451645
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
16461646

@@ -1673,6 +1673,17 @@ def itertuples(self, index: bool = True, name: str | None = "Pandas"):
16731673
"""
16741674
Iterate over DataFrame rows as namedtuples.
16751675
1676+
**Examples:**
1677+
1678+
>>> import bigframes.pandas as bpd
1679+
>>> bpd.options.display.progress_bar = None
1680+
>>> df = bpd.DataFrame({
1681+
... 'A': [1, 2, 3],
1682+
... 'B': [4, 5, 6],
1683+
... })
1684+
>>> next(df.itertuples(name="Pair"))
1685+
Pair(Index=0, A=1, B=4)
1686+
16761687
Args:
16771688
index (bool, default True):
16781689
If True, return the index as the first element of the tuple.
@@ -1685,18 +1696,6 @@ def itertuples(self, index: bool = True, name: str | None = "Pandas"):
16851696
An object to iterate over namedtuples for each row in the
16861697
DataFrame with the first field possibly being the index and
16871698
following fields being the column values.
1688-
1689-
1690-
**Examples:**
1691-
1692-
>>> import bigframes.pandas as bpd
1693-
>>> bpd.options.display.progress_bar = None
1694-
>>> df = bpd.DataFrame({
1695-
... 'A': [1, 2, 3],
1696-
... 'B': [4, 5, 6],
1697-
... })
1698-
>>> next(df.itertuples(name="Pair"))
1699-
Pair(Index=0, A=1, B=4)
17001699
"""
17011700
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
17021701

@@ -3155,7 +3154,7 @@ def join(self, other, *, on: Optional[str] = None, how: str) -> DataFrame:
31553154
on:
31563155
Column in the caller to join on the index in other, otherwise
31573156
joins index-on-index. Like an Excel VLOOKUP operation.
3158-
how ({'left', 'right', 'outer', 'inner'}, default 'left'`):
3157+
how ({'left', 'right', 'outer', 'inner'}, default 'left'):
31593158
How to handle the operation of the two objects.
31603159
``left``: use calling frame's index (or column if on is specified)
31613160
``right``: use `other`'s index. ``outer``: form union of calling

0 commit comments

Comments
 (0)
Failed to load comments.