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 iloc.__setitem__ with the other Series from the same DataFrame. #1388

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Apr 1, 2020

Fixing a bug of iloc.__setitem__ which throws an AnalysisException even when the value is the other Series from the same DataFrame.

>>> kdf = ks.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
>>> kser = kdf.a
>>> kser.iloc[[1]] = -kdf.b
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: 'Resolved attribute(s) b#2L missing from __distributed_sequence_column__#44L,__index_level_0__#0L,a#1L,__natural_order__#48L in ...

@ueshin ueshin requested a review from HyukjinKwon April 1, 2020 22:20
@codecov-io
Copy link

codecov-io commented Apr 1, 2020

Codecov Report

Merging #1388 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1388      +/-   ##
==========================================
- Coverage   95.23%   95.23%   -0.01%     
==========================================
  Files          34       34              
  Lines        7810     7805       -5     
==========================================
- Hits         7438     7433       -5     
  Misses        372      372              
Impacted Files Coverage Δ
databricks/koalas/indexing.py 94.51% <100.00%> (-0.06%) ⬇️

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 0460d1d...0b14039. Read the comment docs.

@itholic
Copy link
Contributor

itholic commented Apr 2, 2020

LGTM

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice fix!

@HyukjinKwon HyukjinKwon merged commit 8268a83 into databricks:master Apr 2, 2020
@ueshin ueshin deleted the iloc_setitem branch April 2, 2020 17:07
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.

4 participants