-
Notifications
You must be signed in to change notification settings - Fork 367
Fix bug when assign None to name as Index #974
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #974 +/- ##
==========================================
+ Coverage 94.57% 94.74% +0.16%
==========================================
Files 34 34
Lines 6487 6487
==========================================
+ Hits 6135 6146 +11
+ Misses 352 341 -11
Continue to review full report at Codecov.
|
databricks/koalas/indexes.py
Outdated
| raise ValueError('Names must be a list-like') | ||
| internal = self._kdf._internal | ||
| if len(internal.index_map) != len(names): | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this line. Otherwise looks fine cc @ueshin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops... i should have double checked that.
Thanks for the comment!
Softagram Impact Report for pull/974 (head commit: b70eac6)⭐ Change Overview
📄 Full report
Impact Report explained. Give feedback on this report to [email protected] |
| .format(len(internal.index_map), len(names))) | ||
| names = [name if isinstance(name, tuple) else (name,) for name in names] | ||
|
|
||
| names = [name if isinstance(name, (tuple, type(None))) else (name,) for name in names] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should usually be is None but isinstance(type(None)) is legitimate too. so I think it's fine.

Resolves #971