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

Implement Index.droplevel & MultiIndex.droplevel #1340

Merged
merged 4 commits into from
Mar 13, 2020

Conversation

HyukjinKwon
Copy link
Member

This PR implements droplevel.

Takes over #1091

@codecov-io
Copy link

codecov-io commented Mar 12, 2020

Codecov Report

Merging #1340 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
- Coverage   95.24%   95.16%   -0.09%     
==========================================
  Files          34       34              
  Lines        7489     7506      +17     
==========================================
+ Hits         7133     7143      +10     
- Misses        356      363       +7
Impacted Files Coverage Δ
databricks/koalas/missing/indexes.py 100% <ø> (ø) ⬆️
databricks/koalas/indexes.py 96.31% <100%> (-0.07%) ⬇️
databricks/koalas/__init__.py 91.48% <0%> (-2.13%) ⬇️
databricks/conftest.py 94.33% <0%> (-1.89%) ⬇️
databricks/koalas/generic.py 97.13% <0%> (-0.41%) ⬇️
databricks/koalas/plot.py 94.04% <0%> (-0.24%) ⬇️
databricks/koalas/groupby.py 91.25% <0%> (-0.22%) ⬇️
databricks/koalas/frame.py 96.66% <0%> (-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 2471502...383b141. Read the comment docs.

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM.

index_map = list(self._internal.index_map.items())
index_map = OrderedDict(index_map[c] for c in range(0, nlevels) if c not in int_level)
sdf = self._internal.spark_frame
sdf = sdf.select(self._internal.index_spark_columns)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can also drop some from self._internal.index_spark_columns?

@HyukjinKwon HyukjinKwon merged commit b248a21 into databricks:master Mar 13, 2020
@HyukjinKwon HyukjinKwon deleted the index-droplevel branch September 11, 2020 07:52
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