Skip to content

fix to_datetime default error suppression #8894

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
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pandas/tseries/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _guess_datetime_format_for_array(arr, **kwargs):
if len(non_nan_elements):
return _guess_datetime_format(arr[non_nan_elements[0]], **kwargs)

def to_datetime(arg, errors='ignore', dayfirst=False, utc=None, box=True,
def to_datetime(arg, errors='raise', dayfirst=False, utc=None, box=True,
format=None, coerce=False, unit='ns',
infer_datetime_format=False):
"""
Expand All @@ -182,8 +182,8 @@ def to_datetime(arg, errors='ignore', dayfirst=False, utc=None, box=True,
Parameters
----------
arg : string, datetime, array of strings (with possible NAs)
errors : {'ignore', 'raise'}, default 'ignore'
Errors are ignored by default (values left untouched)
errors : {'ignore', 'raise'}, default 'raise'
Option to ignore errors and leave the values that raise them untouched.
dayfirst : boolean, default False
If True parses dates with the day first, eg 20/01/2005
Warning: dayfirst=True is not strict, but will prefer to parse
Expand Down