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

Fix a test caused by a bug introduced in pandas 1.1.3. #1829

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Oct 6, 2020

There is a bug introduced in pandas 1.1.3.

>>> pdf = pd.DataFrame({("x", "a"): [1, 2, 6, 4, 4, 6, 4, 3, 7], ("x", "b"): [4, 2, 7, 3, 3, 1, 1, 1, 2], ("y", "c"): [4, 2, 7, 3, None, 1, 1, 1, 2], ("z", "d"): list("abcdefght")}, index=[0, 1, 3, 5, 6, 8, 9, 9, 9])
>>> pdf
   x       y  z
   a  b    c  d
0  1  4  4.0  a
1  2  2  2.0  b
3  6  7  7.0  c
5  4  3  3.0  d
6  4  3  NaN  e
8  6  1  1.0  f
9  4  1  1.0  g
9  3  1  1.0  h
9  7  2  2.0  t
>>> pdf[("x", "a")].groupby(pdf[("x", "b")]).sum().sort_index()
Traceback (most recent call last):

...

TypeError: only integer scalar arrays can be converted to a scalar index

@ueshin
Copy link
Collaborator Author

ueshin commented Oct 6, 2020

I'd merge this now to unblock other PRs.

@ueshin ueshin merged commit 81cbded into databricks:master Oct 6, 2020
@ueshin ueshin deleted the fix_test branch October 6, 2020 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant