Skip to content
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

List accessor #55777

Merged
merged 29 commits into from
Nov 3, 2023
Merged

List accessor #55777

merged 29 commits into from
Nov 3, 2023

Conversation

rohanjain101
Copy link
Contributor

@rohanjain101 rohanjain101 commented Oct 31, 2023

@rohanjain101 rohanjain101 marked this pull request as ready for review October 31, 2023 20:54
@rohanjain101
Copy link
Contributor Author

Not sure why doc string test is failing.

@mroeschke mroeschke added Nested Data Data where the values are collections (lists, sets, dicts, objects, etc.). Arrow pyarrow functionality labels Nov 1, 2023
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment and some mypy issues otherwise LGTM

@rohanjain101
Copy link
Contributor Author

rohanjain101 commented Nov 2, 2023

@mroeschke I'm not really sure how to work around the CI failure, it looks like the issue is that I'm calling _pa_array in arrow accessor which is only defined in the ArrowExtensionArray, but it's also impossible for the Series to not be backed by an ArrowExtensionArray because of the call to _validate in init.

I looked at the old code in StructAccessor and it was also accessing _pa_array directly, not sure how that one passed the check and this one doesn't. Would appreciate some guidance with this.

EDIT: look like it passing now, but I have a number of other CI failures:

   with pytest.raises(pytz.AmbiguousTimeError, match=dtstr):
      DatetimeIndex([dtobj], tz=tz2)

E Failed: DID NOT RAISE <class 'pytz.exceptions.AmbiguousTimeError'>

Looks unrelated.

@mroeschke mroeschke added this to the 2.2 milestone Nov 3, 2023
@mroeschke mroeschke merged commit 2c1d4bb into pandas-dev:main Nov 3, 2023
32 of 34 checks passed
@mroeschke
Copy link
Member

Nice work @rohanjain101!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Nested Data Data where the values are collections (lists, sets, dicts, objects, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add list accessor for PyArrow list types to support __getitem__
2 participants