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

TST verify groupby doesn't alter unit64s to floats #30859 #36164

Merged
merged 2 commits into from
Sep 7, 2020

Conversation

TAJD
Copy link
Contributor

@TAJD TAJD commented Sep 6, 2020

Logic of the test is to check that the value hasn't changes and that the dtype remains uint64.

test_value = 16148277970000000000
df = pd.DataFrame({"first": [1], "second": [1], "value": [test_value]})
df_grouped = df.groupby(["first", "second"])["value"].max()
assert df_grouped.values == test_value
Copy link
Contributor

Choose a reason for hiding this comment

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

can you call df_grouped -> result
and then construct expected and use
tm.assert_frame_equal(result, expected)

also move the test somewhere around this test test_groupby_dtype_inference_empty

@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Groupby Testing pandas testing functions or related to the test suite labels Sep 6, 2020
@jreback jreback added this to the 1.2 milestone Sep 7, 2020
@jreback jreback merged commit b37c9f8 into pandas-dev:master Sep 7, 2020
@jreback
Copy link
Contributor

jreback commented Sep 7, 2020

thanks @TAJD

jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this pull request Sep 8, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 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 Groupby Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multicolumn GroupBy appears to convert unit64s to floats
2 participants