8000 TST: add test for agg on ordered categorical cols by mathurk1 · Pull Request #35630 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST: add test for agg on ordered categorical cols #35630

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 6 commits into from
Aug 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading < 8000 /div>
Diff view
Diff view
Prev Previous commit
Next Next commit
replace np arr and dtype conversion with list
  • Loading branch information
root committed Aug 8, 2020
commit 87c9eaed26dc05c29fa737c909030875774b0631
3 changes: 1 addition & 2 deletions pandas/tests/groupby/aggregate/test_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,7 @@ def test_groupby_agg_categorical_cols():
multi_index_tuple = [("nr", "min"), ("nr", "max"), ("cat_ord", "min")]
multi_index = pd.MultiIndex.from_tuples(multi_index_tuple)

data = np.array([(1, 4, "a"), (5, 8, "c")])
data = [(1, 4, "a"), (5, 8, "c")]
expected_df = pd.DataFrame(data=data, columns=multi_index, index=cat_index)
expected_df["nr"] = expected_df["nr"].astype("int64")

tm.assert_frame_equal(result_df, expected_df)
0