-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
BUG: Datetime64Formatter not respecting formatter
#13567
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
Conversation
formatter
pandas/tests/formats/test_format.py
Outdated
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 last test goes with all of the test_to_string* tests.
pandas/tests/formats/test_format.py
Outdated
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.
add a test where to_html are tested as well
Current coverage is 84.34%@@ master #13567 diff @@
==========================================
Files 138 138
Lines 51155 51135 -20
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43130 43132 +2
+ Misses 8025 8003 -22
Partials 0 0
|
|
lgtm. |
doc/source/whatsnew/v0.18.2.txt
Outdated
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.
note the reason we leave space in the bug fix section is to avoid conflicts (IOW put up higher in a blank space). @jorisvandenbossche you prob want to move on merge.
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.
thanks for the tip, added blank lines before my bugfix entry. hope that helps with the merge.
…output for df.to_string, df.to_html methods added tests for time of day formatting and df.to_html added test for formatters kw for df.to_latex add whatsnew entry move whatsnew entry higher up
|
@haleemur Merged, thanks a lot! (I moved the whatsnew note to 0.19.0, as master is now targeted for that) |
- [x] closes pandas-dev#10690 - [x] tests added / passed - [x] passes ``git diff upstream/master | flake8 --diff`` - [x] whatsnew entry the Datetime64Formatter class did not accept a `formatter` argument, so custom formatters passed in through `df.to_string` or `df.to_html` were silently ignored. Author: Haleemur Ali <haleemur@gmail.com> This patch had conflicts when merged, resolved by Committer: Joris Van den Bossche <jorisvandenbossche@gmail.com> Closes pandas-dev#13567 from haleemur/fix/dt64_outputformat and squashes the following commits: 8d84283 [Haleemur Ali] fix bug in Datetime64Formatter, which affected custom date formatted output for df.to_string, df.to_html methods
git diff upstream/master | flake8 --diffthe Datetime64Formatter class did not accept a
formatterargument, so custom formatters passed in throughdf.to_stringordf.to_htmlwere silently ignored.