Skip to content

Commit

Permalink
docs: add the docs for loc and iloc indexers (#446)
Browse files Browse the repository at this point in the history
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> 🦕
  • Loading branch information
ashleyxuu authored Mar 18, 2024
1 parent adadb06 commit 14ab8d8
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/reference/bigframes.pandas/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BigQuery DataFrames (pandas)
general_functions
series
frame
indexers
indexing
window
groupby
Expand Down
32 changes: 32 additions & 0 deletions docs/reference/bigframes.pandas/indexers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

=========
Indexers
=========

ILocDataFrameIndexer
--------------------
.. autoclass:: bigframes.core.indexers.ILocDataFrameIndexer
:members:
:inherited-members:
:undoc-members:

IlocSeriesIndexer
-----------------
.. autoclass:: bigframes.core.indexers.IlocSeriesIndexer
:members:
:inherited-members:
:undoc-members:

LocDataFrameIndexer
-------------------
.. autoclass:: bigframes.core.indexers.LocDataFrameIndexer
:members:
:inherited-members:
:undoc-members:

LocSeriesIndexer
----------------
.. autoclass:: bigframes.core.indexers.LocSeriesIndexer
:members:
:inherited-members:
:undoc-members:
12 changes: 10 additions & 2 deletions docs/templates/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@
- name: SeriesGroupBy
uid: bigframes.core.groupby.SeriesGroupBy
name: Groupby
- name: Indexes
uid: bigframes.core.indexes.index.Index
- items:
- name: ILocDataFrameIndexer
uid: bigframes.core.indexers.ILocDataFrameIndexer
- name: IlocSeriesIndexer
uid: bigframes.core.indexers.IlocSeriesIndexer
- name: LocDataFrameIndexer
uid: bigframes.core.indexers.LocDataFrameIndexer
- name: LocSeriesIndexer
uid: bigframes.core.indexers.LocSeriesIndexer
name: Indexers
- name: pandas
uid: bigframes.pandas
- items:
Expand Down
15 changes: 14 additions & 1 deletion third_party/bigframes_vendored/pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5111,7 +5111,20 @@ def replace(

@property
def iloc(self):
"""Purely integer-location based indexing for selection by position."""
"""Purely integer-location based indexing for selection by position.
Returns:
bigframes.core.indexers.ILocDataFrameIndexer: Purely integer-location Indexers.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

@property
def loc(self):
"""Access a group of rows and columns by label(s) or a boolean array.
Returns:
bigframes.core.indexers.ILocDataFrameIndexer: Indexers object.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

@property
Expand Down
15 changes: 14 additions & 1 deletion third_party/bigframes_vendored/pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3313,7 +3313,20 @@ def map(

@property
def iloc(self):
"""Purely integer-location based indexing for selection by position."""
"""Purely integer-location based indexing for selection by position.
Returns:
bigframes.core.indexers.IlocSeriesIndexer: Purely integer-location Indexers.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

@property
def loc(self):
"""Access a group of rows and columns by label(s) or a boolean array.
Returns:
bigframes.core.indexers.LocSeriesIndexer: Indexers object.
"""
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)

@property
Expand Down

0 comments on commit 14ab8d8

Please sign in to comment.