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

Add len() for Index & MultiIndex #1161

Merged
merged 1 commit into from
Dec 30, 2019
Merged

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Dec 30, 2019

an alias for size

>>> pidx = pd.Index(range(1000))
>>> kidx = ks.Index(range(1000))
>>> len(pidx)
1000
>>> len(kidx)
1000

for MultiIndex

>>> pidx = pd.MultiIndex.from_tuples([('a', 'x', 1), ('b', 'y', 2), ('c', 'z', 3)])
>>> kidx = ks.MultiIndex.from_tuples([('a', 'x', 1), ('b', 'y', 2), ('c', 'z', 3)])
>>> len(pidx)
3
>>> len(kidx)
3

@itholic itholic changed the title Add len() for Index & MultiIndex [MINOR] Add len() for Index & MultiIndex Dec 30, 2019
@codecov-io
Copy link

codecov-io commented Dec 30, 2019

Codecov Report

Merging #1161 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1161      +/-   ##
==========================================
+ Coverage   95.22%   95.22%   +<.01%     
==========================================
  Files          35       35              
  Lines        7059     7061       +2     
==========================================
+ Hits         6722     6724       +2     
  Misses        337      337
Impacted Files Coverage Δ
databricks/koalas/indexes.py 96.66% <100%> (+0.02%) ⬆️

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 91ec06a...fa6c47c. Read the comment docs.

@HyukjinKwon HyukjinKwon changed the title [MINOR] Add len() for Index & MultiIndex Add len() for Index & MultiIndex Dec 30, 2019
@HyukjinKwon HyukjinKwon merged commit 4d50bf2 into databricks:master Dec 30, 2019
@itholic itholic deleted the i_len branch January 2, 2020 07:55
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