Skip to content

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Sep 23, 2020

MultiIndex.from_frame doesn't raise exception properly when given parameter is not a DataFrame.

>>> pd.MultiIndex.from_frame(10)
Traceback (most recent call last):
...
TypeError: Input must be a DataFrame

>>> ks.MultiIndex.from_frame(10)
Traceback (most recent call last):
...
AttributeError: 'int' object has no attribute 'to_spark'

This PR fixed it and added related tests.

@itholic
Copy link
Contributor Author

itholic commented Sep 23, 2020

I'd merge this for now because it's just a simple exception handling addition.
Please feel free to leave any comments.

@itholic itholic merged commit 18d1d38 into databricks:master Sep 23, 2020
@itholic itholic deleted the fix_from_frame branch October 6, 2020 00:16
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