-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
BUG: Fix date_format and datetime_format arguments to ExcelWriter being ignored #47315
BUG: Fix date_format and datetime_format arguments to ExcelWriter being ignored #47315
Conversation
Swap rows and columns so that columns are homogenous and dates aren't converted to datetimes (i.e. datetime64[ns]) on initialisation of df. Clarify scope of test.
Avoid messy branching within test due to handling different engines in parametrization on TestExcelWriter class. Different engines have different APIs for accessing formatting info so probably better as tests in per-engine test files, even though this entails some duplication across files.
|
||
def test_write_date_datetime_format(ext): | ||
# see gh-44284 | ||
xlrd = pytest.importorskip("xlrd") |
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.
This shouldn't be needed. It's already called near the top of the file
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Notes:
TestExcelWriter
class, which is parametrized over the different writers, gave some quite awkward code branching between the different APIs for the different engines. So I decided to move the tests to the test files for each individual engine, though this leaves some duplication between them.Potential outstanding issues:
TextExcelWriter
to the individual test files meant losing theopenpyxl-.xlsm
parameter, since there didn't seem to be a file where this extension was being tested.ODSWriter
does not seem to respect them, and this may be a limitation of the ODF specification. This felt like it was out-of-scope for this bug. Consequently, there was not a test added for the ODF engine.