Skip to content

TST: IntegerNA Support for DataFrame.diff() #34889

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

Merged
merged 3 commits into from
Jun 20, 2020
Merged

Conversation

Marvzinc
Copy link
Contributor

Test for IntegerNA support DataFrame.diff().

pytest tests/frame/methods/test_diff.py::TestDataFrameDiff::test_diff_integer_na

@jorisvandenbossche jorisvandenbossche added the Testing pandas testing functions or related to the test suite label Jun 20, 2020
@jorisvandenbossche jorisvandenbossche changed the title TST: IntegerNA Support for DataFrame.diff() (#24171) TST: IntegerNA Support for DataFrame.diff() Jun 20, 2020
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
Can you also checked the expected result when doing diff(axis=1) ?

@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions ExtensionArray Extending pandas with custom dtypes or arrays. Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jun 20, 2020
)

# Test case for default behaviour of diff
result_default = df.diff()
Copy link
Contributor

Choose a reason for hiding this comment

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

hate to be pendantic about this, but can you use result & expected for both cases (the variable names)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Didn't want to overwrite the variable names here. Would you suggest to overwrite, or create a separate test function?

Copy link
Member

Choose a reason for hiding this comment

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

just overwriting the same names is fine here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I parameterized the test so overwriting is not necessary anymore.

Copy link
Member

Choose a reason for hiding this comment

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

I parameterized the test so overwriting is not necessary anymore.

Did you push these changes? Currently I can't see any parametrisation

@jreback jreback added this to the 1.1 milestone Jun 20, 2020
@jreback
Copy link
Contributor

jreback commented Jun 20, 2020

looks good (will merge shortly, trying to get master to run first).

@jreback jreback merged commit 23d1b02 into pandas-dev:master Jun 20, 2020
@jreback
Copy link
Contributor

jreback commented Jun 20, 2020

thanks @Marvzinc

wesbarnett pushed a commit to wesbarnett/pandas that referenced this pull request Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions ExtensionArray Extending pandas with custom dtypes or arrays. Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IntegerNA Support for DataFrame.diff()
4 participants