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

ENH: Series.explode to support pyarrow-backed list types #53602

Merged

Conversation

lukemanley
Copy link
Member

@lukemanley lukemanley added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Arrow pyarrow functionality labels Jun 11, 2023
@lukemanley lukemanley added this to the 2.1 milestone Jun 11, 2023
@@ -141,3 +143,25 @@ def test_explode_scalars_can_ignore_index():
result = s.explode(ignore_index=True)
expected = pd.Series([1, 2, 3])
tm.assert_series_equal(result, expected)


@pytest.mark.skipif(pa_version_under7p0, reason="minimum pyarrow not installed")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Could you just use pa = pytest.importorskip("pyarrow") below?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated



@pytest.mark.skipif(pa_version_under7p0, reason="minimum pyarrow not installed")
def test_explode_pyarrow_list_type():
Copy link
Member

Choose a reason for hiding this comment

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

Could you parameterize on ignore_index as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

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.

Looks good just a merge conflict

@mroeschke mroeschke merged commit ee43ae0 into pandas-dev:main Jun 13, 2023
@mroeschke
Copy link
Member

Thanks @lukemanley

@lukemanley lukemanley deleted the series-explode-pyarrow-list-type branch June 13, 2023 23:27
canthonyscott pushed a commit to canthonyscott/pandas-anthony that referenced this pull request Jun 23, 2023
…53602)

* ENH: Series.explode to support pyarrow-backed list types

* gh refs

* update test
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
…53602)

* ENH: Series.explode to support pyarrow-backed list types

* gh refs

* update test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants