Skip to content

Conversation

@ueshin
Copy link
Collaborator

@ueshin ueshin commented Jan 10, 2020

No description provided.

@ueshin ueshin requested a review from HyukjinKwon January 10, 2020 01:04
@ueshin ueshin changed the title Add to_frame and fix Index.to_series. Add Index.to_frame. Jan 10, 2020
Comment on lines +79 to +80
# FIXME: the index values are not addressed the change. (#1190)
# self.assert_eq((kidx + 1).to_series(), (pidx + 1).to_series())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Filed #1190.

@codecov-io
Copy link

codecov-io commented Jan 10, 2020

Codecov Report

Merging #1187 into master will decrease coverage by 0.02%.
The diff coverage is 93.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1187      +/-   ##
==========================================
- Coverage   95.24%   95.21%   -0.03%     
==========================================
  Files          35       35              
  Lines        7105     7132      +27     
==========================================
+ Hits         6767     6791      +24     
- Misses        338      341       +3
Impacted Files Coverage Δ
databricks/koalas/missing/indexes.py 100% <ø> (ø) ⬆️
databricks/koalas/indexes.py 96.3% <93.54%> (-0.59%) ⬇️
databricks/koalas/internal.py 95.72% <0%> (-0.02%) ⬇️
databricks/koalas/series.py 96.46% <0%> (ø) ⬆️

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 15a6406...90b2aad. Read the comment docs.

@softagram-bot
Copy link

Softagram Impact Report for pull/1187 (head commit: 90b2aad)

⚠️ Copy paste found

ℹ️ test_indexes.py: Copy paste fragment on line 32 shared with ../test_numpy_compat.py:

    def pdf(self):
        return pd.DataFrame({
            'a': [1, 2, 3, 4, 5, 6, 7, 8, 9],
            'b': [4, 5, 6, 3, 2, 1, 0, 0, 0],
        }, index=[0, 1, 3, 5, 6, 8, 9, 9, 9])...(truncated 101 chars)

ℹ️ indexes.py: Copy paste fragment inside the same file on lines 858, 1578:

            raise NotImplementedError(
                \"Doesn't support symmetric_difference between Index & MultiIndex for now\")

        sdf_self = self._kdf._s...(truncated 477 chars)

Now that you are on the file, it would be easier to pay back some tech. debt.

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Impact Report explained. Give feedback on this report to [email protected]

index_map = [(name_like_string(idx), n)
for idx, n in zip(name, self._internal.index_names)]
else:
index_map = None # type: ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not pretty sure,

but how about index_map = [(SPARK_INDEX_NAME_FORMAT(0), None)]??

then maybe can we avoid attach_default_index ?

Copy link
Collaborator Author

@ueshin ueshin Jan 12, 2020

Choose a reason for hiding this comment

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

What's the SPARK_INDEX_NAME_FORMAT(0) like here then?

Copy link
Contributor

@itholic itholic Jan 13, 2020

Choose a reason for hiding this comment

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

ah, i was mistaken. sorry for the confusion. 😞

(i thought sdf already has index column, so we could rename it to __index_level_0__ using alias and make index_map as [('index_level_0', None)] explicitly, but it was my mistaken)

@HyukjinKwon HyukjinKwon merged commit 90cc67f into databricks:master Jan 13, 2020
@ueshin ueshin deleted the to_frame branch January 13, 2020 18:23
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.

5 participants