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 DataFrame.swapaxes #1946

Merged
merged 6 commits into from
Dec 4, 2020

Conversation

xinrong-meng
Copy link
Contributor

@xinrong-meng xinrong-meng commented Dec 3, 2020

ref #1929

Implement DataFrame.swapaxes

        >>> kdf = ks.DataFrame(
        ...     [[1, 2, 3], [4, 5, 6], [7, 8, 9]], index=['x', 'y', 'z'], columns=['a', 'b', 'c']
        ... )
        >>> kdf
           a  b  c
        x  1  2  3
        y  4  5  6
        z  7  8  9
        >>> kdf.swapaxes()
           x  y  z
        a  1  4  7
        b  2  5  8
        c  3  6  9
        >>> kdf.swapaxes(i=1, j=0)
           x  y  z
        a  1  4  7
        b  2  5  8
        c  3  6  9
        >>> kdf.swapaxes(i=1, j=1)
           a  b  c
        x  1  2  3
        y  4  5  6
        z  7  8  9

@codecov-io
Copy link

codecov-io commented Dec 3, 2020

Codecov Report

Merging #1946 (29560a6) into master (138c7b8) will decrease coverage by 0.93%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1946      +/-   ##
==========================================
- Coverage   94.64%   93.71%   -0.94%     
==========================================
  Files          49       49              
  Lines       10818    10717     -101     
==========================================
- Hits        10239    10043     -196     
- Misses        579      674      +95     
Impacted Files Coverage Δ
databricks/koalas/missing/frame.py 100.00% <ø> (ø)
databricks/koalas/frame.py 96.75% <100.00%> (ø)
databricks/koalas/usage_logging/__init__.py 25.66% <0.00%> (-66.65%) ⬇️
databricks/koalas/usage_logging/usage_logger.py 47.82% <0.00%> (-52.18%) ⬇️
databricks/koalas/__init__.py 81.25% <0.00%> (-9.38%) ⬇️
databricks/conftest.py 96.61% <0.00%> (-3.39%) ⬇️
databricks/koalas/testing/utils.py 79.12% <0.00%> (-1.40%) ⬇️
...ricks/koalas/tests/plot/test_series_plot_plotly.py 95.83% <0.00%> (-0.47%) ⬇️
databricks/koalas/generic.py 92.79% <0.00%> (-0.13%) ⬇️
databricks/koalas/plot/matplotlib.py 93.23% <0.00%> (-0.12%) ⬇️
... and 17 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 138c7b8...1dffe07. 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.

databricks/koalas/frame.py Show resolved Hide resolved
@xinrong-meng xinrong-meng marked this pull request as ready for review December 4, 2020 00:39
@xinrong-meng xinrong-meng merged commit 347ce57 into databricks:master Dec 4, 2020
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