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

REG: Regression in explode when column is non string #43802

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

phofl
Copy link
Member

@phofl phofl commented Sep 29, 2021

This should cover the issue since the other pr did not make any progress.

Is there a fixture providing all scalar dtypes?

@phofl phofl added Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Sep 29, 2021
@phofl phofl added this to the 1.3.4 milestone Sep 29, 2021
@jreback
Copy link
Contributor

jreback commented Sep 29, 2021

pandas/core/frame.py:8298: error: List item 0 has incompatible type "Union[str, Tuple[Any, ...], List[Union[str, Tuple[Any, ...]]]]"; expected "Union[str, Tuple[Any, ...]]" [list-item]

otherwise lgtm

@phofl
Copy link
Member Author

phofl commented Sep 30, 2021

Now I rememeber why the assertion was there

@jreback
Copy link
Contributor

jreback commented Sep 30, 2021

Is there a fixture providing all scalar dtypes?
ea_scalar_and_dtype

prob could add one for all scalar types

@jreback jreback merged commit 2a0e772 into pandas-dev:master Sep 30, 2021
@jreback
Copy link
Contributor

jreback commented Sep 30, 2021

thanks @phofl

@jreback
Copy link
Contributor

jreback commented Sep 30, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Sep 30, 2021

Something went wrong ... Please have a look at my logs.

@phofl phofl deleted the 43314 branch September 30, 2021 12:54
@phofl
Copy link
Member Author

phofl commented Sep 30, 2021

Will do as a follow up

phofl added a commit that referenced this pull request Sep 30, 2021
…ing (#43817)

Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
@@ -8201,7 +8201,7 @@ def stack(self, level: Level = -1, dropna: bool = True):

def explode(
self,
column: str | tuple | list[str | tuple],
column: Scalar | tuple | list[Scalar | tuple],
Copy link
Member

Choose a reason for hiding this comment

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

we normally use Hashable for index labels. We also have the alias in pandas._typing IndexLabel = Union[Hashable, Sequence[Hashable]]

Copy link
Member Author

Choose a reason for hiding this comment

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

Thx. #43834

gasparitiago pushed a commit to gasparitiago/pandas that referenced this pull request Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.explode is failing on scalar int value.
3 participants