-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
add try / except to address issue #10154 to_datetime, Inconsistent be… #10216
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c35860d
add try / except to address issue #10154 to_datetime, Inconsistent be…
vincentdavis f3dd848
Add test for issue #10154
vincentdavis b4ef19d
Include test for ValueError for fix of issue #10154
vincentdavis 9b23e5c
Add more to_datetime tests
vincentdavis 7327f6b
support both sqlalchemy engines and connections Fixes #7877
3d54fe7
Updated to_hdf doc string
80597dc
Merge pull request #10105 from graingert/sqlalchemy-connectable
jorisvandenbossche 0859e07
Merge pull request #10499 from joshlk/master
jreback 9da54ad
Merge pull request #10500 from sinhrks/test_quantile
sinhrks d670fc7
add try / except to address issue #10154 to_datetime, Inconsistent be…
vincentdavis 2bd978f
Add test for issue #10154
vincentdavis e4e72c2
Include test for ValueError for fix of issue #10154
vincentdavis d0b63e5
Add more to_datetime tests
vincentdavis e43b721
rebase
vincentdavis 7153e6a
fix merge
vincentdavis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
import nose | ||
from numpy import nan | ||
import numpy as np | ||
from pandas import Index, isnull, Timestamp | ||
from pandas import Index, isnull, Timestamp, to_datetime, NaT | ||
from pandas.util.testing import assert_almost_equal | ||
import pandas.util.testing as tm | ||
from pandas.compat import range, lrange, zip | ||
|
@@ -737,6 +737,13 @@ def test_get_period_field_raises_on_out_of_range(self): | |
def test_get_period_field_array_raises_on_out_of_range(self): | ||
self.assertRaises(ValueError, period.get_period_field_arr, -1, np.empty(1), 0) | ||
|
||
class TestDaysInMonth(tm.TestCase): | ||
def test_day_not_in_month_coerce_true(self): | ||
self.assertTrue(isnull(to_datetime('2015-02-29', coerce=True))) | ||
self.assertTrue(isnull(to_datetime('2015-02-29', format="%Y-%m-%d", coerce=True))) | ||
self.assertTrue(isnull(to_datetime('2015-02-32', format="%Y-%m-%d", coerce=True))) | ||
self.assertTrue(isnull(to_datetime('2015-04-31', format="%Y-%m-%d", coerce=True))) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add off these cases again, but with |
||
if __name__ == '__main__': | ||
import nose | ||
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'], | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
pls add the issue number as a comment
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.
I thought I did, not sure what went wrong.