Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Dec 22, 2023
1 parent 3eb7f0b commit 1279378
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion pandas/core/arrays/arrow/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,12 @@ def field(
Parameters
----------
name_or_index : str | int
name_or_index : str | bytes | int | expression | list
Name or index of the child field to extract.
For list-like inputs, this will index into a nested
struct.
Returns
-------
pandas.Series
Expand All @@ -306,6 +309,8 @@ def field(
field's name.
- For a :class:`pyarrow.compute.Expression`, this is set to
the string form of the expression.
- For list-like `name_or_index`, the name will be set to the
name of the final field selected.
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/series/accessors/test_struct_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from pandas.compat.pyarrow import pa_version_under11p0
from pandas.compat.pyarrow import pa_version_under15p0

from pandas import (
ArrowDtype,
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_struct_accessor_api_for_invalid(invalid):
([b"string_col"], "string_col"),
],
)
@pytest.mark.skipif(pa_version_under11p0, reason="pyarrow>=11.0.0 required")
@pytest.mark.skipif(pa_version_under15p0, reason="pyarrow>=11.0.0 required")
def test_struct_accessor_field_expanded(indices, name):
arrow_type = pa.struct(
[
Expand Down

0 comments on commit 1279378

Please sign in to comment.