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: add examples for at/iat #582

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 5 commits into from
Apr 8, 2024
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
48 changes: 48 additions & 0 deletions 48 third_party/bigframes_vendored/pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5362,6 +5362,30 @@ def loc(self):
def iat(self):
"""Access a single value for a row/column pair by integer position.

**Examples:**

>>> import bigframes.pandas as bpd
>>> df = bpd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
... columns=['A', 'B', 'C'])
>>> bpd.options.display.progress_bar = None
>>> df
A B C
0 0 2 3
1 0 4 1
2 10 20 30
<BLANKLINE>
[3 rows x 3 columns]

Get value at specified row/column pair

>>> df.iat[1, 2]
1

Get value within a series

>>> df.loc[0].iat[1]
2

Returns:
bigframes.core.indexers.IatDataFrameIndexer: Indexers object.
"""
Expand All @@ -5371,6 +5395,30 @@ def iat(self):
def at(self):
"""Access a single value for a row/column label pair.

**Examples:**

>>> import bigframes.pandas as bpd
>>> df = bpd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
... index=[4, 5, 6], columns=['A', 'B', 'C'])
>>> bpd.options.display.progress_bar = None
>>> df
A B C
4 0 2 3
5 0 4 1
6 10 20 30
<BLANKLINE>
[3 rows x 3 columns]

Get value at specified row/column pair

>>> df.at[4, 'B']
2

Get value within a series

>>> df.loc[5].at['B']
4

Returns:
bigframes.core.indexers.AtDataFrameIndexer: Indexers object.
"""
Expand Down
33 changes: 33 additions & 0 deletions 33 third_party/bigframes_vendored/pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3308,6 +3308,22 @@ def loc(self):
def iat(self):
"""Access a single value for a row/column pair by integer position.

**Examples:**

>>> import bigframes.pandas as bpd
>>> s = bpd.Series(bpd.Series([1, 2, 3]))
>>> bpd.options.display.progress_bar = None
>>> s
0 1
1 2
2 3
dtype: Int64

Get value at specified row number

>>> s.iat[1]
2

Returns:
bigframes.core.indexers.IatSeriesIndexer: Indexers object.
"""
Expand All @@ -3317,6 +3333,23 @@ def iat(self):
def at(self):
"""Access a single value for a row/column label pair.

**Examples:**

>>> import bigframes.pandas as bpd
>>> s = bpd.Series([1, 2, 3], index=['A', 'B', 'C'])
>>> bpd.options.display.progress_bar = None
>>> s
A 1
B 2
C 3
dtype: Int64

Get value at specified row label

>>> s.at['B']
2


Returns:
bigframes.core.indexers.AtSeriesIndexer: Indexers object.
"""
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.