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

Support to set attributes for DataFrame. #1989

Merged
merged 1 commit into from
Dec 29, 2020
Merged

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Dec 28, 2020

Support to set attributes for DataFrame.

>>> kdf = ks.DataFrame({'A': [1, 2, 3, None]})
>>> kdf.A = kdf.A.fillna(kdf.A.median())
>>> kdf
     A
0  1.0
1  2.0
2  3.0
3  2.0

@codecov-io
Copy link

codecov-io commented Dec 28, 2020

Codecov Report

Merging #1989 (f2c4a00) into master (6796aa4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1989   +/-   ##
=======================================
  Coverage   94.55%   94.55%           
=======================================
  Files          50       50           
  Lines       10939    10949   +10     
=======================================
+ Hits        10343    10353   +10     
  Misses        596      596           
Impacted Files Coverage Δ
databricks/koalas/extensions.py 100.00% <100.00%> (ø)
databricks/koalas/frame.py 96.75% <100.00%> (+0.01%) ⬆️

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 6796aa4...f2c4a00. Read the comment docs.

@ueshin ueshin marked this pull request as ready for review December 28, 2020 21:50
@ueshin ueshin changed the title Support setattr for DataFrame. Support to set attributes for DataFrame. Dec 28, 2020
Copy link
Contributor

@itholic itholic left a comment

Choose a reason for hiding this comment

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

LGTM

@ueshin
Copy link
Collaborator Author

ueshin commented Dec 29, 2020

Thanks! merging.

@ueshin ueshin merged commit 9a9c178 into databricks:master Dec 29, 2020
@ueshin ueshin deleted the setattr branch December 29, 2020 19:13
ueshin added a commit that referenced this pull request Dec 30, 2020
This is a follow-up of #1989.
There are some more places where setting attributes with the overwritten `DataFrame.__setattr__`.
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.

3 participants