databricks / koalas

Koalas: pandas API on Apache Spark
Apache License 2.0
3.32k stars 356 forks source link

Implement `Index.map` functionality #2136

Closed awdavidson closed 2 years ago

awdavidson commented 3 years ago

Please see change to implement Index.map functionality similar to that available in pandas. Requirement raised in issue: #1929

awdavidson commented 3 years ago

@xinrong-databricks @ueshin Hi both, please see my PR to add Index.map functionality. Just a note build is failing due to

Warning, treated as error:
1655 /home/runner/work/koalas/koalas/docs/source/getting_started/10min.ipynb::Line 2731 exceeds the line-length-limit.
1656 make: *** [Makefile:21: html] Error 2
1657 Error: Process completed with exit code 2.

I see other PR branches are failing with this issue too. Are you aware?

xinrong-meng commented 3 years ago

It is an ongoing build issue. Thanks for letting us know! We will look into this.

xinrong-meng commented 3 years ago

FYI the issue is resolved, please pull master and then retrigger tests.

ueshin commented 3 years ago

GitHub Actions seems unstable now.

GitHub Actions has encountered an internal error when running your job.

codecov-io commented 3 years ago

Codecov Report

Merging #2136 (f845001) into master (0fd088e) will decrease coverage by 0.02%. The diff coverage is 92.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2136      +/-   ##
==========================================
- Coverage   95.37%   95.34%   -0.03%     
==========================================
  Files          60       62       +2     
  Lines       13694    13780      +86     
==========================================
+ Hits        13060    13139      +79     
- Misses        634      641       +7     
Impacted Files Coverage Δ
databricks/koalas/missing/indexes.py 100.00% <ø> (ø)
databricks/koalas/indexes/extension.py 83.33% <83.33%> (ø)
databricks/koalas/indexes/base.py 97.33% <100.00%> (+0.01%) :arrow_up:
databricks/koalas/tests/indexes/test_base.py 100.00% <100.00%> (ø)
databricks/koalas/tests/indexes/test_extension.py 100.00% <100.00%> (ø)

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 0fd088e...f845001. Read the comment docs.

xinrong-meng commented 3 years ago

Would you add a new entry Index.map under the Conversion section of https://github.com/databricks/koalas/blob/master/docs/source/reference/indexing.rst?

xinrong-meng commented 2 years ago

Hi @awdavidson, since Koalas has been ported to Spark as pandas API on Spark, would you like to migrate this PR to the Spark repository? Here is the ticket https://issues.apache.org/jira/browse/SPARK-36394. Otherwise, I may do that for you next week.

awdavidson commented 2 years ago

Hi @awdavidson, since Koalas has been ported to Spark as pandas API on Spark, would you like to migrate this PR to the Spark repository? Here is the ticket https://issues.apache.org/jira/browse/SPARK-36394. Otherwise, I may do that for you next week.

Hi @xinrong-databricks, apologies for the delay it has been crazily busy the last few months! Yes, if you don’t mind please migrate. I’ll look at addressing you last comment as soon as possible.

xinrong-meng commented 2 years ago

:) That's totally fine. I will migrate it and keep you updated then.

xinrong-meng commented 2 years ago

Hi @awdavidson, I would like to close this PR since it has been migrated to Spark. Thanks!