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 Series.unstack to support non-numeric type and keep the names #1527

Merged
merged 4 commits into from
May 25, 2020

Conversation

itholic
Copy link
Contributor

@itholic itholic commented May 22, 2020

According to #1501 (comment) and #1501 (comment), Fix Series.unstack() to support non-numeric type and keep the names of index and columns.

>>> kser = ks.Series(list('abcd'), index=pd.MultiIndex.from_product([['one', 'two'], ['a', 'b']], names=["A", "B"]))
>>> kser
A    B
one  a    a
     b    b
two  a    c
     b    d
Name: 0, dtype: object

>>> kser.unstack()
B    a  b
A
two  c  d
one  a  b

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2020

Codecov Report

Merging #1527 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1527   +/-   ##
=======================================
  Coverage   94.14%   94.14%           
=======================================
  Files          37       37           
  Lines        8487     8491    +4     
=======================================
+ Hits         7990     7994    +4     
  Misses        497      497           
Impacted Files Coverage Δ
databricks/koalas/series.py 97.76% <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 26c0501...150c738. Read the comment docs.

@HyukjinKwon
Copy link
Member

LGTM otherwise.

@HyukjinKwon HyukjinKwon merged commit 3a673be into databricks:master May 25, 2020
@itholic itholic deleted the fix_s_unstack branch May 29, 2020 00:51
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