Skip to content

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Oct 29, 2019

Resolves #971

>>> kidx
Int64Index([1, 2, 3], dtype='int64', name='a')
>>> kidx.name = None
>>> kidx
Int64Index([1, 2, 3], dtype='int64')

@itholic itholic changed the title Fix bug when assign to name as Index Fix bug when assign None to name as Index Oct 29, 2019
@codecov-io
Copy link

codecov-io commented Oct 30, 2019

Codecov Report

Merging #974 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
databricks/koalas/indexes.py 96.62% <100%> (ø) ⬆️
databricks/koalas/frame.py 96.02% <0%> (-0.01%) ⬇️
databricks/koalas/namespace.py 87.26% <0%> (+0.11%) ⬆️
databricks/koalas/config.py 100% <0%> (+12.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2286bd...b70eac6. Read the comment docs.

raise ValueError('Names must be a list-like')
internal = self._kdf._internal
if len(internal.index_map) != len(names):

Copy link
Member

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

Copy link
Contributor Author

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-bot
Copy link

Softagram Impact Report for pull/974 (head commit: b70eac6)

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 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]
Copy link
Member

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.

@HyukjinKwon HyukjinKwon merged commit 7b8bd93 into databricks:master Oct 31, 2019
@itholic itholic deleted the i_bug_fix branch November 6, 2019 05:34
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.

BUG: Index setter is not working when None is assigned to name

4 participants