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 .loc to work properly when using 'slice' #1159

Merged
merged 14 commits into from
Jan 8, 2020

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Dec 30, 2019

Resolve #1158

>>> kdf
            max_speed  shield
cobra               1       2
viper               4       5
sidewinder          7       8

>>> kdf.loc['cobra':'viper', 'max_speed']
cobra    1
viper    4
Name: max_speed, dtype: int64

>>> kdf.to_pandas().loc['cobra':'viper', 'max_speed']
cobra    1
viper    4
Name: max_speed, dtype: int64

@codecov-io
Copy link

codecov-io commented Jan 1, 2020

Codecov Report

Merging #1159 into master will increase coverage by 0.01%.
The diff coverage is 96.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1159      +/-   ##
==========================================
+ Coverage   95.22%   95.24%   +0.01%     
==========================================
  Files          35       35              
  Lines        7058     7087      +29     
==========================================
+ Hits         6721     6750      +29     
  Misses        337      337
Impacted Files Coverage Δ
databricks/koalas/series.py 96.54% <ø> (+0.1%) ⬆️
databricks/koalas/indexing.py 94.83% <96.77%> (+0.45%) ⬆️
databricks/koalas/testing/utils.py 78.51% <0%> (-0.75%) ⬇️
databricks/koalas/window.py 97.09% <0%> (-0.02%) ⬇️
databricks/koalas/base.py 96.34% <0%> (ø) ⬆️
databricks/koalas/groupby.py 91.6% <0%> (ø) ⬆️
databricks/koalas/missing/common.py 100% <0%> (ø) ⬆️
databricks/koalas/missing/indexes.py 100% <0%> (ø) ⬆️
databricks/koalas/frame.py 97.01% <0%> (ø) ⬆️
... and 4 more

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 b3e9682...8718352. Read the comment docs.

@itholic
Copy link
Contributor Author

itholic commented Jan 2, 2020

hmm.. i have no idea why codecov has failed although it seems that tests are covering all cases

databricks/koalas/tests/test_indexing.py Outdated Show resolved Hide resolved
databricks/koalas/indexing.py Outdated Show resolved Hide resolved
databricks/koalas/indexing.py Outdated Show resolved Hide resolved
databricks/koalas/indexing.py Outdated Show resolved Hide resolved
@ueshin
Copy link
Collaborator

ueshin commented Jan 7, 2020

btw, we can remove line 236?

In addition, with a slice, Koalas works as a filter between the range.

@itholic
Copy link
Contributor Author

itholic commented Jan 8, 2020

Resolves #1173

@HyukjinKwon
Copy link
Member

Looks fine otherwise.

@HyukjinKwon HyukjinKwon merged commit 93f1be9 into databricks:master Jan 8, 2020
@HyukjinKwon
Copy link
Member

Thanks, merged.

@itholic itholic deleted the bug_loc branch January 8, 2020 11:17
HyukjinKwon pushed a commit that referenced this pull request Jan 9, 2020
rising-star92 added a commit to rising-star92/databricks-koalas that referenced this pull request Jan 27, 2023
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.

.loc behavior when using 'slice'
5 participants