-
Notifications
You must be signed in to change notification settings - Fork 358
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_excel #288
DataFrame.to_excel #288
Conversation
@shril you need to include
|
Just figured that out. Btw thanks @garawalid. :) |
kdf = self.kdf | ||
excel_writer = "output.xlsx" | ||
|
||
self.assert_eq(kdf.to_excel(excel_writer), pdf.to_excel(excel_writer)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we assert the output.xlsx is the same, rather than asserting on the return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rxin, should I load the values of the generated excel files in 2 dataframes and check the values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that'd work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you write it to a temporary location that's unique too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rxin, I have made the changes you asked for.
Please have a look.
@shril you are welcome! |
Codecov Report
@@ Coverage Diff @@
## master #288 +/- ##
==========================================
+ Coverage 93.49% 93.56% +0.07%
==========================================
Files 33 33
Lines 3212 3247 +35
==========================================
+ Hits 3003 3038 +35
Misses 209 209
Continue to review full report at Codecov.
|
if os.path.isfile(location2): | ||
os.remove(location2) | ||
if os.path.exists(directory): | ||
os.rmdir(directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use TestUtils.temp_dir
or TestUtils.temp_file
.
class DataFrameConversionTest(ReusedSQLTestCase, SQLTestUtils, TestUtils):
...
def test_xxx(self):
with self.temp_dir() as tmp:
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ueshin, I have changed it according to your suggestions.
Please have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending tests.
Hi @ueshin, I have changed according to your specifications. |
Thanks! merging to master. |
* DataFrame.to_excel * Lint fix * Lint fix * Lint fix * Added install of openpxyl as excel engine * Comparing the values of generated excel files * Added xlrd as dependecncy * Added xlrd as dependecncy * Refactored the code * Moving the libraries to test suite * Used TestUtils functions for creating and removing files and folder * Lint fix * Lint fix * Added precautionary note in inline doc of DataFrame.to_excel * Using temp_dir function of TestUtils for creating temporary folder * Removing redundant library * Removing redundant library
No description provided.