Skip to content

Commit

Permalink
docs: update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
arwas11 committed Nov 11, 2024
1 parent 5b80fe1 commit f3a0332
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions bigframes/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def nlevels(self) -> int:
def values(self) -> np.ndarray:
return self.to_numpy()

## need to be added to 3rd party is a separate PR
@property
def ndim(self) -> int:
return 1
Expand Down
22 changes: 21 additions & 1 deletion third_party/bigframes_vendored/pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def values(self):
**Examples:**
>>> import bigframes.pandas as bpd
>>> bpd.options.display.progress_bar = None
>>> idx = bpd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='Int64')
Expand All @@ -60,7 +63,7 @@ def values(self):
Returns:
array:
numpy.ndarray or ExtensionArray
Numpy.ndarray or ExtensionArray
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
Expand All @@ -69,6 +72,23 @@ def values(self):
def shape(self):
"""
Return a tuple of the shape of the underlying data.
**Examples:**
>>> import bigframes.pandas as bpd
>>> bpd.options.display.progress_bar = None
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='Int64')
>>> idx.shape
(3,)
Returns:
Tuple[int]:
A tuple of int representing the shape.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

Expand Down

0 comments on commit f3a0332

Please sign in to comment.