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

BUG: DataFrame.apply with axis=1 and EA dtype #38272

Merged
merged 3 commits into from Dec 4, 2020

Conversation

jbrockmendel
Copy link
Member

@simonjayhawkins simonjayhawkins added this to the 1.1.5 milestone Dec 3, 2020
@simonjayhawkins simonjayhawkins added Apply Apply, Aggregate, Transform Regression Functionality that used to work in a prior pandas version ExtensionArray Extending pandas with custom dtypes or arrays. labels Dec 3, 2020
@simonjayhawkins
Copy link
Member

Thanks @jbrockmendel for the PR.

The code sample in #36785 still fails, but now with ValueError: Length of passed values is 2, index implies 4.

but happy to close #36785 if we feel that the underlying issue is solved.

@simonjayhawkins
Copy link
Member

can you add a release note to 1.1.5 in the regression fixes section

@simonjayhawkins
Copy link
Member

but happy to close #36785 if we feel that the underlying issue is solved.

looks like there maybe still an issue.

@jbrockmendel
Copy link
Member Author

ill take another look this afternoon

@simonjayhawkins
Copy link
Member

looks like there maybe still an issue.

thanks @jbrockmendel. code sample in OP is now passing.

before the edit, the existing test_invert_array was failing on ci which had more than 1 row. so that case is covered.

The sample in the OP was still failing and the dataframe had more than 1 column. Since only the one test was failing, it appears that this case is not covered by existing tests.

maybe we should an additional test case to test_apply_axis1_with_ea, maybe...

        df = DataFrame(date_range("2020", periods=3, tz="UTC")).T
        result = df.apply(lambda x: x, axis=1)
        tm.assert_frame_equal(result, df)

obj = self.obj
for i in range(len(obj)):
yield obj._ixs(i, axis=0)

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, obviously we want to sync these up in a followon

@jreback jreback merged commit b5233c4 into pandas-dev:master Dec 4, 2020
@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Dec 4, 2020
simonjayhawkins pushed a commit that referenced this pull request Dec 4, 2020
…8295)

Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
@jbrockmendel
Copy link
Member Author

@simonjayhawkins im falling behind on GH notifications. do i need to make a PR adding more tests or something here?

@jbrockmendel jbrockmendel deleted the bug-36785 branch December 5, 2020 20:59
@simonjayhawkins
Copy link
Member

The PR was merged so I assume not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform ExtensionArray Extending pandas with custom dtypes or arrays. Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REGR: Row series are broken after applying to_datetime()
3 participants