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

DataFrame.to_clipboard & Series.to_clipboard #257

Merged
merged 12 commits into from
May 13, 2019

Conversation

garawalid
Copy link
Contributor

@garawalid garawalid commented May 7, 2019

Add DataFrame.to_clipboard and Series.to_clipboard. Part of #169.

Improve validate_arguments_and_invoke_function() when receiving argument **kwargs

  • actual args : {'kwargs': {'index': False}, 'sep': ',', 'excel': True}
  • expected args : {'sep': ',', 'excel': True, 'index': False}

databricks/koalas/frame.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented May 8, 2019

Codecov Report

Merging #257 into master will increase coverage by 0.01%.
The diff coverage is 95.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #257      +/-   ##
==========================================
+ Coverage   93.57%   93.59%   +0.01%     
==========================================
  Files          33       34       +1     
  Lines        3286     3325      +39     
==========================================
+ Hits         3075     3112      +37     
- Misses        211      213       +2
Impacted Files Coverage Δ
databricks/koalas/missing/frame.py 100% <ø> (ø) ⬆️
databricks/koalas/missing/series.py 100% <ø> (ø) ⬆️
databricks/koalas/series.py 92.28% <100%> (+0.1%) ⬆️
databricks/koalas/tests/test_series_conversion.py 100% <100%> (ø)
databricks/koalas/tests/test_utils.py 100% <100%> (ø) ⬆️
...tabricks/koalas/tests/test_dataframe_conversion.py 100% <100%> (ø) ⬆️
databricks/koalas/utils.py 100% <100%> (ø) ⬆️
databricks/koalas/frame.py 94.47% <75%> (-0.34%) ⬇️

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 397f76f...c18d5f9. Read the comment docs.

databricks/koalas/frame.py Outdated Show resolved Hide resolved
@garawalid
Copy link
Contributor Author

@rxin any idea why codecov fails?

@HyukjinKwon
Copy link
Member

I think it's spurious failure

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Can we do Series.to_clipboard together while we're here?

@garawalid
Copy link
Contributor Author

@HyukjinKwon I added Series.to_clipboard

@garawalid garawalid changed the title DataFrame.to_clipboard DataFrame.to_clipboard & Series.to_clipboard May 9, 2019
@garawalid
Copy link
Contributor Author

New tests in doctest for Series.to_clipboard using Series instead of DataFrame.

@@ -35,6 +35,16 @@ def to_html(self, max_rows=None, unsupported_param=None):
}, index=[0, 1, 3])
validate_arguments_and_invoke_function(pdf, self.to_html, pd.DataFrame.to_html, args)

def to_clipboard(self, sep=',', **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this test case here? this file is for testing functionalities in utils.py

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test case is for testing **kwargs in validate_arguments_and_invoke_function()

Improve validate_arguments_and_invoke_function() when receiving argument **kwargs

  • actual args : {'kwargs': {'index': False}, 'sep': ',', 'excel': True}
  • expected args : {'sep': ',', 'excel': True, 'index': False}

@HyukjinKwon
Copy link
Member

whoa .. merging others made some conflicts here..

@garawalid
Copy link
Contributor Author

@HyukjinKwon done!

@garawalid
Copy link
Contributor Author

I'll solve the conflict!

@garawalid
Copy link
Contributor Author

cc @HyukjinKwon

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Looks good. Let me double check and get this in today.

@HyukjinKwon HyukjinKwon merged commit 12240df into databricks:master May 13, 2019
athena15 pushed a commit to athena15/koalas that referenced this pull request May 13, 2019
Add `DataFrame.to_clipboard` and `Series.to_clipboard`. Part of databricks#169.

Improve `validate_arguments_and_invoke_function()`  when receiving argument `**kwargs`
+ actual args : `{'kwargs': {'index': False}, 'sep': ',', 'excel': True}`
+ expected args : `{'sep': ',', 'excel': True, 'index': False}`
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.

4 participants